SourceForge logo
SourceForge logo
Menu

Re: [matplotlib-devel] low-hanging fruit on the transforms branch

From: Eric F. <ef...@ha...> - 2007年11月07日 07:46:59
Mike,
On my machine, with pcolor from the trunk:
efiring@manini:~/test$ python pcolortest2.py
init: 2.0
fps: 0.287026406429
And substituting pcolormesh for pcolor:
init: 0.27
fps: 5.48245614035
Now that's more like it!
Using image can be another order of magnitude faster than pcolormesh 
(but with limitations, of course). I suspect nonuniform image code is 
intermediate, but it is a long time since I have tried it.
Eric
Michael Droettboom wrote:
> Attaching benchmark.
> 
> 
> ------------------------------------------------------------------------
> 
> from numpy.random import rand
> import matplotlib
> from matplotlib.pyplot import pcolor, savefig, show, ion, axis, draw, axes
> import time
> 
> ion()
> 
> t = time.clock()
> pcolor(rand(1000,100))
> print "init: ", time.clock() - t
> 
> frames = 25.0
> t = time.clock()
> for i in xrange(int(frames)):
> part = (1.0 - (i / frames) / 2.0)
> axes().set_ylim((0.0, 1000.0 * part))
> draw()
> print "fps:", frames / (time.clock() - t)
> 
> # show()
> 

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 によって変換されたページ (->オリジナル) /