Hello everbody,

sometimes I need an autoscaling when my new data points in a figure have small 
values compared to some deleted ones. So I thought ax.autoscale_view() would 
be the solution, but it seems to remember deleted data and so doesn't scale 
limits like I want. A little program showing my problem can be seen below.

Could anyone help me or give me a little hint?

Thanks in advance,

Matthias

>---------------------------------------------------------------------------
import pylab as P

P.ion()
P.figure()
ax = P.subplot(111)
P.plot(P.array([0,1]), P.array([0,2]))
P.plot(P.array([1.1,2]), P.array([2.2,4]))
P.draw()

raw_input(" delete one graph by pressing <return>")
ax.lines.pop(-1)
P.draw()
P.draw()

raw_input(" manually setting new limits by pressing <return>")
ax.set_autoscale_on = False
ax.axis([-0.1, 1.1, -0.1, 2.1])
ax.set_autoscale_on = True
P.draw()
P.draw()

raw_input(" do 'ax.autoscale_view()' by pressing <return> ")
ax.autoscale_view()
P.draw()
P.draw()
# autoscale_view() rescales to old limits with all of the data
raw_input(" end programm by pressing <return>")
P.ioff()
>-------------------------------------------------------------------------------

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to