On Fri, Dec 19, 2008 at 2:20 AM, Michiel de Hoon <mjldeh...@yahoo.com> wrote: >> This looks great -- in particular I am intrigued by the >> final timing results which show your backend 12 times >> faster than tkagg. I am not sure where this speedup is >> coming from -- do you have some ideas? > > In this example, I am drawing 16 subplots in a 4x4 grid. With Tkagg, I am > noticing that the first few subplots appear quickly, but subsequent subplots > get slower and slower. I think that this is due to how the event loop works. > In my understanding, tkagg redraws the window when a subplot is added. So to > draw subplot 16, tkagg also needs to redraw subplots 1..15, causing the > progressive slowdown. The native backend draws all 16 at once, and draws each > of them only once. Using plot() instead of bar() doesn't really make a > difference; the same slowdown happens there with the agg backends.
Could you post the script you are using to do the profiling? The call to subplot/plot/bar should not trigger a draw, unless "interactive" is set to True http://matplotlib.sourceforge.net/users/shell.html Interactive is not the best word, but it is the rc parameter meaning "you are using mpl from the interactive prompt and want every pyplot command to update the plot". If the macosx backend is not doing this it should. If tkagg is issuing draw commands on pyplot commands when interactive is False, it is a bug that we should be able to fix. Thanks, JDH ------------------------------------------------------------------------------ _______________________________________________ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel