On Mon, May 18, 2009 at 10:23 AM, guillaume ranquet <granq...@wyplay.com> wrote: > I'm trying to get approx 4k points plotted into 5 subplots which I would > like interactive (ie: ability to zoom/pan ...). > there's nothing special except that the subplots share axe x. > > > It gets some seconds (3 to 5) on a p4 dual core @ 3Ghz to pan/zoom. It > seems utterly slow to me: what do you think? normal "rate" or flawed code? > I tried using various backend, embedding it into qt4 ... nothing helped > much. > > the code is quite fat atm (500 lines or so). I'll try to cut through the > code to get an example in a few lines if it's said my code is flawed and > the plotting rate should be way faster!
Instead of starting with your cod,e start from scratch and see if you can reproduce the problem. If not, figure out what is different and work your way up. Here is some test code -- note that Eric Firing made a contribution on the svn trunk that significantly speeds up this use case: import numpy as np import matplotlib.pyplot as plt fig = plt.figure() Nplots = 5 Npoints = 5000 for i in range(Nplots): if i==0: ax = ax1 = fig.add_subplot(Nplots,1,i+1) else: ax = fig.add_subplot(Nplots,1,i+1, sharex=ax1) ax.plot(np.random.rand(Npoints)) ax.set_xlim(100, 200) plt.show() ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users