From: John H. <jd...@gm...> - 2009-06-15 14:47:26
|
On Mon, Jun 15, 2009 at 9:36 AM, TP<par...@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. Turn autoscaling off with ax.set_autoscale_on(False) update the line with line.set_ydata(newdata) draw the canvas with fig.canvas.draw() JDH |