Matthias Michler wrote: > I'm not sure that I understand you correctly. The code I refering is the one > which I attached some mails ago. The following works for me:
Ah, okay, to get the problem I was having, change your script as follows: > --------------------------------------------------------------------------------- > from pylab import * > from datetime import datetime > from time import sleep > > ion() # interactive mode 'on' > figure() > ax = subplot(111, autoscale_on=True) > > x, y = [datetime.now()], [0] > line = plot(x, y, label="my_data")[0] > # get the line-object as the first > element > # of the tuple returned by plot > legend() > for i in arange(30): > x.append(datetime.now()) # append new values > y.append(i**2) > line.set_data(x,y) # reset data > ax.relim() # reset axes limits > ax.autoscale_view() # rescale axes > draw() # redraw current figure > sleep(0.3) # wait 0.3 seconds > > ioff() > show() So, basically make the x axis time instead of numbers. I think the problem is actually that the daets are quite long in their format. If they were rotated through 90 degress it'd likely be fine. How would I do this? Also, how would I get this kind of updating with bar charts or errorbars? cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users