I am trying to plot a series of functions on the same graphs. The code seems to run ok, but there is no picture coming coming out. just simply
<matplotlib.figure.Figure at 0xeafea58>
How can it be fixed?
In the IPython console, the best way to make sure figures show up (without explicitly calling
plt.show()) is to use
%matplotlib mode. If matplotlib is installed correctly, it should automatically choose a suitable backend for your system.
In : import matplotlib.pyplot as plt In : plt.plot([1, 2, 3]) # no plot shown! Out: [<matplotlib.lines.Line2D at 0x110eac898>] In : %matplotlib Using matplotlib backend: MacOSX In : plt.plot([1, 2, 3]) # plot shown now Out: [<matplotlib.lines.Line2D at 0x112174400>]
%matplotlib magic command only needs to be entered once per session.