Hi all, and thanks for amazing matplotlib. I devellop my
> data processing / plotting software using glade, pygtk,
> scipy and matplotlib 0.83.2.
> I use the class library and I run into trouble with
> I expected that autoscale_view() function of axes class
> would do autoscaling. But if I update the data using
> set_data(), set_xdatat() or set_ydata() (of lines object)
> and I call autoscale_view() of the corresponding axes and
> then redraw the canvas, the scale is not changed and some
> data points are thus out of the picture.
> Do I miss or misunderstand something ?
The axes keeps a copy of the "dataLim" and won't automatically know if
you change the line's data. You need to call
ax.update_datalim_numerix(x, y, ignore)
where x and y are the numerix arrays you pass to line.set_data.
If ignore is True, the previous data passed to the axes will be
ignored in computing the new datalim. If False, the datalim will
include the previous data and the current data you are passing it.
After this, a call to
should work as you expect.