Maximize plotwindow & hot to plot figure by figure?

2 Problems:

  1. How is it possible to maximize the window of the plot?

  2. First I want to plot only figure 0, after 5 seconds figure 0 has to be closed and figure 1 to be shown.

Any suggestions?

from pylab import *
import time

ion()

figure(0)
plot([1,2,3])

figure(1)
plot([10, 20, 30])

figure(0)
plot([4, 5, 6])

figure(1)
plot([40, 50, 60])

draw(0)
time.sleep(5)
close()

draw(1)

show()

2 Problems:

1. How is it possible to maximize the window of the plot?

If the window is open and you are in the mainloop ypu can press ' f ' for
fullscreen mode. Furthmore you can modify the figure-size by
figure(figsize=(16, 8))

2. First I want to plot only figure 0, after 5 seconds figure 0 has to be
closed and figure 1 to be shown.

Any suggestions?

for the second point I attached an example which uses an earlier 'draw' to
actually show the first figure in interactive mode.
Furthermore I proposed an example without generating new figures and reusing
one figure.

Kind regards,
Matthias

figure_by_figure.py (585 Bytes)

ยทยทยท

On Friday 12 February 2010 00:36:41 zxc wrote:

from pylab import *
import time

ion()

figure(0)
plot([1,2,3])

figure(1)
plot([10, 20, 30])

figure(0)
plot([4, 5, 6])

figure(1)
plot([40, 50, 60])

draw(0)
time.sleep(5)
close()

draw(1)

show()