How to save image without showing?

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

    > small program

There are a couple of ways to do it. It would help to know what
platform you are on. On linux/unix, there are the postscript and GD
backends which can generate images 'offline' w/o showing them. At
present, there is no way to generate a GTK image (GTK is the default
backend) w/o showing it. You should read the web pages

for more information on these issues.

Postscript is a high quality output that is more useful on linux/unix
platforms where there are usually viewers, converters and printers by
default. GD can be used to make PNGs and other image formats without
showing the image, but as far as I know there is no good windows
installer for gd module yet. I've spent some time working on it, and
have been corresponding with the author of gdmodule, and can probably
come up with one in the near future.

So that's the long answer. The short answer is -- if you are on
linux, install gd module following the instructions on the matplotlib
web site and use the GD or PS backend. If you are on windows, wait a
little bit and I'll see about getting the gd installer going, which is
something I've been meaning to do anyway.

John Hunter