|
From: Jesper L. <jes...@gm...> - 2012-08-15 09:40:23
|
Hi Matplotlib users I have an application where performance is critical and matplotlib is the performance bottleneck. I am making a lot of figures using the same basic setup of the figure. And from my profiling I can see that this basic setup accounts for most of the CPU time. Let us say that I make a given figure including some axes. My questions are: 1. Can I make a copy of this figure including axes (copy.deepcopy does not work on Figure objects) and use the copy for plotting on? 2. And how? Should I use the frozen method somehow? I did do something similar some years back. But at the time I removed the stuff I had drawn on the figure. I would like to avoid this for two reasons: 1) Thread safety, I must be able to draw figures in several simultaneous threads and 2) I really had to go into some low-level details in matplotlib (not a show-stopper, but for maintenance reasons I would like to keep the code as clear as possible). Best regards, Jesper |