[pyplot] using f1=figure(1)

Giacomo Boffi giacomo.boffi at polimi.it
Mon Mar 28 12:04:02 EDT 2011


i executed the following interactions and i remained disappointed

$ python
Python 2.6.6 (r266:84292, Dec 27 2010, 00:02:40) 
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from pylab import *
>>> f1=figure(1)
>>> f2=figure(2)
>>> f1
<matplotlib.figure.Figure object at 0xb745668c>
>>> f2
<matplotlib.figure.Figure object at 0x8df834c>
>>> plot(sin(linspace(0,10)),figure=f1)
[<matplotlib.lines.Line2D object at 0x8df8fac>]
>>> plot(cos(linspace(0,10)),figure=f2)
[<matplotlib.lines.Line2D object at 0x8df8f0c>]
>>> show()
>>> 

i'm surely off by one in my understanding of the plot command, as i
expected a sine in figure 1 and a cosine in 2, while what i got was a
blank figure 1 and both the sine and the cosine in figure 2

can anyone help me? tia
                                                                gb




More information about the Python-list mailing list