# Python program to generate plots in batch import matplotlib matplotlib.use("AGG") from pylab import * X = np.linspace(-np.pi, np.pi, 256,endpoint=True) C,S = np.cos(X), np.sin(X) plot(X,C) plot(X,S) # show() savefig('plot-cs.png')