|
From: Goyo <goy...@gm...> - 2012-06-19 19:27:57
|
2012/6/8 Maximilian Fabricius <mfa...@gm...>: > Hi all, > > it seems that whenever I plot something, a window opens. > > from matplotlib import pylab > import numpy > pylab.plot(numpy.random.normal(size=100)) > > Now, I have code that is supposed to produce diagnostic plots as PDFs. Only > when I pass a command line option the script should actually open a > window and also display > the results on the screen. > > I am pretty sure that in earlier times the window would only open when > I call pylab.show(). > > It may well be that I messed too much with my matplotlibrc, if you > could just point me in the right direction ... > > I use matplotlib 1.0.1 on a Mac with the MacOSX backend. >From http://matplotlib.sourceforge.net/faq/usage_faq.html#non-interactive-example: ---------------------------------------------------------- import matplotlib.pyplot as plt plt.ioff() plt.plot([1.6, 2.7]) Nothing happened–or at least nothing has shown up on the screen (unless you are using macosx backend, which is anomalous). ---------------------------------------------------------- Goyo |