I have a simple fix for this on this branch: https://github.com/mdboom/matplotlib/tree/slow_update
It's sort of the simplest thing that could work. It caches the last results of "_update_ticks" and only updates them if the view limits or axis position have changed. It also invalidates this cache upon changing the set of ticks etc.
It makes things considerably faster -- it still has to draw all of the elements of the plot every time. Fixing that would require a lot more low-level replumbing (matplotlib doesn't currently do region-based updating etc.).
Mike On 10/20/2011 11:17 PM, John Gu wrote:
Thanks. Is there a place where these sorts of issues can be submitted for review / fixes? I'm totally willing to take a look at possible solutions if someone points me in the right direction. Thanks.On Thu, Oct 20, 2011 at 10:52 PM, Eric Firing <[email protected] <mailto:[email protected]>> wrote:On 10/20/2011 03:47 PM, John Gu wrote: > Hello, > > I'm using version 1.0.1 of matplotlib on a linux machine. uname -a > returns the following: Linux jgulinux 2.6.35.14-95.fc14.x86_64 #1 SMP > Tue Aug 16 21:01:58 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux. > > [jgu@jgulinux ~/.matplotlib]$ cat matplotlibrc > backend : TkAgg > interactive : True > > Program that reproduces the problem (run in ipython): > > x = arange(1000) > y = x > > f = figure(1) > for ia in xrange(5): > for ib in xrange(5): > ax = subplot(5,5,ia*5+ib+1, navigate=True) > ax.plot(x,y) > > If we now tried to interactively navigate through any single subplot of > the figure, it is extremely slow. Not sure if this is a configuration > error on my side? No, and it is not backend-dependent, either. And it does not even require that all of the plots have data--it is the same if only the last subplot has data. A little experimentation indicates that all the ticks and tick labels on the other subplots are slowing down the interaction with the one subplot being navigated. ax.tick_params(labelbottom=False, labelleft=False) ax.tick_params(left=False, right=False, top=False, bottom=False) Insert the above to turn off ticks and tick labels, and it speeds up nicely. That's not a solution, I realize. I knew that slowness in the tick and tick label generation was a major bottleneck in subplot creation, but I did not realize that it had such an effect on interactive manipulation of a single subplot. Eric > > John ------------------------------------------------------------------------------ The demand for IT networking professionals continues to grow, and the demand for specialized networking skills is growing even more rapidly. Take a complimentary Learning@Cisco Self-Assessment and learn about Cisco certifications, training, and career opportunities. http://p.sf.net/sfu/cisco-dev2dev _______________________________________________ Matplotlib-users mailing list [email protected] <mailto:[email protected]> https://lists.sourceforge.net/lists/listinfo/matplotlib-users ------------------------------------------------------------------------------ The demand for IT networking professionals continues to grow, and the demand for specialized networking skills is growing even more rapidly. Take a complimentary Learning@Cisco Self-Assessment and learn about Cisco certifications, training, and career opportunities. http://p.sf.net/sfu/cisco-dev2dev _______________________________________________ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
------------------------------------------------------------------------------ The demand for IT networking professionals continues to grow, and the demand for specialized networking skills is growing even more rapidly. Take a complimentary Learning@Cisco Self-Assessment and learn about Cisco certifications, training, and career opportunities. http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
