Hello Chris, maybe I don't know exactly what you want to do - let me try once more: You try to plot a line where point need to be added, isn't it? My first idea was that there should be independent points.
maybe something like the following helps you: ----------------------------------------------------------------------------------------- from pylab import * from time import sleep ion() # interactive mode 'on' figure() ax = subplot(111, autoscale_on=True) x, y = [0], [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(10): x.append(i) # 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.5) # wait 0.5 seconds ioff() show() -------------------------------------------------------------------------------- I don't know how to make this somehow interactive concerning the data input. but maybe you save the data to a file and read them every 15 or 20 minutes. best regards Matthias On Tuesday 11 March 2008 19:37, Chris Withers wrote: > Chris Withers wrote: > > Matthias Michler wrote: > >> plot([x1], [y1], "bo", [x2], [y2], "r+") > > > > This didn't work :-S > > > > - the first time I call show(), execution never comes back to my script > > so the code never gets to plot any further points > > Okay, thanks to Ryan, I now have this point fixed, however, with the > following code: > > ion() > i = 1 > while i < 5: > plot([i],[i],'go',[i],[i+2],'ro') > print i > i+=1 > sleep(0.5) > draw() > > - there are no lines between the points, how do I get the lines to show? see above - please > - how would I pass keyword parameters such as "label" or use other > methods such as plot_date? > > Also, when the above script finishes, I get: > > Fatal Python error: PyEval_RestoreThread: NULL tstate > > This application has requested the Runtime to terminate it in an unusual > way. > Please contact the application's support team for more information. > > What does that mean? Sorry I have no idea why that happens on your system > cheers, > > Chris ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users