On Mon, Jun 15, 2009 at 16:36, TP<paratribulati...@free.fr> wrote:
> Hi everybody,
>
> I want to modify a matplotlib.lines.Line2D and update the plot.
> I have used Line2D._y member to modify the line. It works. But by doing
> canvas.draw() (see example below), the line is not updated on the plot. To
> update it, I have to do autoscale_view(). But I do not want the x and y
> ranges of the plot to be changed.

I think you want the 'line.set_ydata' method, where you pass the new Y
data for your plot (there are also set_xdata and set_data to set,
respectively, the X data and the whole set of X/Y); then call a draw
on the canvas.

Regards,
-- 
Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi

------------------------------------------------------------------------------
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

Reply via email to