Hello everybody,

I'm trying something interactive using matplotlib with several subplots.
My problem is that when using 'ax.plot' more than one 'draw()' command is 
needed to redraw the whole figure. 
So my question is: What are the differences in using 'plot' and 'ax.plot'? 

>---------------------------------------------------------------------------------------------------
import pylab as P
x = P.linspace(0, 1, 100)
P.ion()
P.figure()
ax = P.subplot(111)
ax.plot(x, P.sqrt(x), label = r"$f(x) = \sqrt x$")
P.plot(x,       x, label = r"$f(x) =  x$")            
> everything before here is shown after the draw() below
ax.plot(x,    x**2, label = r"$f(x) = x^2$")
ax.legend(loc = 'best')
P.draw()
#P.draw()                                           
> the second draw lets the remaining graphs and the legend
> before the raw_input occur
raw_input("  <return>")

P.ioff()
P.show()
>----------------------------------------------------------------------------------------------------------

Thanks in advance,
Matthias Michler

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