Hi Ole, you can reset the ydata using: ydata = myline.get_ydata() ydata += 50 myline.set_ydata(ydata) # pass new data to line object
or just in-place myline.set_ydata( myline.get_ydata() + 50) after that you need a draw to redraw the figure or a show to show up the result. Does this work for you? best regards Matthias On Wednesday 10 June 2009 12:29:11 Ole Streicher wrote: > Hi, > > I want to change the value of a line in an axes. What I tried is > > myline = axes.plot(...) > > xdata, ydata = myline.get_data() > for i in range(ydata.__len__()): > ydata[i] += 50 > > to shift all y values up by 50. > > But I dont see the change I made, even after a show(). How can I force > the diagram to show the changed value? > > Regards > > Ole ------------------------------------------------------------------------------ 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