Andrea Gavana : > Anyway, if I am not completely off-track, this is something I had been > looking for as well in matplotlib a while back (3, 4 years ago), but > at that time I was told it would have been complicated to implement it > for all the "live" backend (I can't recall the exact reason). > > I would say that, at least for the backends based on wxPython, this > kind of modify-the-live-plot-via-GUI-interaction should be relatively > straightforward, at least for the GUI part and for the basics (line > styles, colours, markers and so on). There is one non-trivial difference between Matplotlib and Matlab. Matplotlib is "just" a library, and not an integrated package with its own event processing loop, multithreading, etc. When you plot() something under Matlab or Scilab, you generate some objecs (gcf, gca) and other stuff, accessible from outside. Your program turns normally, your console works. So, you may launch a procedure which analyses all the plotted data and change the "patches", "lines", "collections", etc., using the matplotlib jargon.
In matplotlib, upon show(), you relinquish the control. The interaction becomes clumsy, the animation becomes clumsy, since matplotlib doesn't give you the full access to the event loop. OF COURSE you may do it, but it will require some work. One possibility is to use an interface which by design works (I presume...) in a separate, non-blocking thread. I mean: IPython. If you launch IPython --pylab, then you may, e.g. construct: x=linspace(0.0,25.0,300); y=sin(x) plot(x,y) and the figure is created without show(). Then, write: a=gca(); p=a.lines[0] and nothing more difficult than: p.set_lw(3); p.set_color('red'); draw() You have edited your line. No need to change the code of matplotlib. Good luck. Jerzy Karczmarczuk ------------------------------------------------------------------------------ Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users