How to save image without showing?

First of all, one of the easiest graph package yet fill with tons of
capability and future potential.

Now my issue:

I am trying to save an image without showing it. Here is small program

···

**************************************************************
from matplotlib.matlab import *
plot([1,2,3])
savefig('test.png')
#show()

***************************************************************

This does not create test.png file, but if I uncomment last line, it create
test.png file. How can I create a test.png file without showing it?

Samir,

Either call it with "python test.py -dGD" or use this code, with 2 new
lines at the beginning.

from matplotlib import use
use('GD')
from matplotlib.matlab import *
plot([1,2,3])
savefig('test.png')

···

----------------
Instructions for installing stuff for GD on the website. But if you just
need an image, do -dPS or use('PS') for postscript output.

  -C
                                                                                
--
Ask not what your computer can do for you; ask.... [ Uh-oh. ]