Most of the time I use matplotlib/pylab I want to see my graphs. When I don’t, I don’t want to see the plot window pop-up and vanish hundreds of times. To prevent the window from appearing add the following to the head of the script:
import matplotlib matplotlib.use('Agg')
When calling savefig() instead of show() the window won’t appear – yey.