I'm using matplotlib on ubuntu 11.04.

I create a figure and an axes and then show it via plt.show().

From the window that plt.show() opens, I save the file to plot-3.png. This works as I can open the file with evince.

However, when my program executes plt.savefig('plot-3.png'), something is saved as a file is created, but when I open the file with evince (or GIMP), I see just the canvas, not the figure.

How do I save under program control?

- Roy