SourceForge logo
SourceForge logo
Menu

Re: [matplotlib-devel] Native backend for Mac OS X

From: John H. <jd...@gm...> - 2008年12月19日 12:52:24
On Fri, Dec 19, 2008 at 2:20 AM, Michiel de Hoon <mjl...@ya...> 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

View entire thread

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /