I am writing a quick-and-dirty script to generate plots on the fly. I am using the code below (from Matplotlib documentation) as a starting point:
from pylab
If you don't like the concept of the "current" figure, do:
import matplotlib.image as mpimg img = mpimg.imread("src.png") mpimg.imsave("out.png", img)