I could only find this from their help section.
Configure matplotlib for interactive use with the default matplotlib
I have been having performance issues plotting using matplotlib.pyplot with the IPython command-line until I tried the --matplotlib option.
Example
Without --matplotlib
$ ipython
In [1]: import matplotlib as mpl
In [2]: import matplotlib.pyplot as plt
In [3]: mpl.get_backend()
Out[3]: u'Qt4Agg'
In [4]: plt.plot([0, 1, 2], [0, 1, 2])
Out[4]: [<matplotlib.lines.Line2D at 0xb473198>]
# IPython command-line becomes entirely unresponsive, must restart IPython to become usable again
With --matplotlib
$ ipython --matplotlib
In [1]: import matplotlib as mpl
In [2]: import matplotlib.pyplot as plt
In [3]: mpl.get_backend()
Out[3]: u'Qt4Agg'
In [4]: plt.plot([0, 1, 2], [0, 1, 2])
Out[4]: [<matplotlib.lines.Line2D at 0xcbe1d68>]
# IPython command-line remains responsive
I suspect a side-effect of using the --matplotlib argument is boosting my performance, but I'd like to know how.
Setup
- IPython: 3.0.0
- matplotlib: 1.4.3
- Python: 2.7.9 :: Anaconda 2.2.0 (64-bit)
- Windows 7 (64-bit)