I'm calling the inline mode for IPython Notebook using;
%pylab inline
And the following code plots a figure immediately at the cell;
fig = plt.figure()
axes = fig.add_axes([0, 0, 1, 1])
However I would like to create the plot/axes etc. in one cell, and plot later using maybe;
fig.show()
How do I gain more control of the inline mode? If I don't use %pylab inline, it creates the plot in a seperate window which I don't want (and it usually freezes the window).
Versions;
Numpy: 1.7.0
Matplotlib: 1.2.1rc1
Python: 2.7.2 (default, Jun 24 2011, 12:22:14) [MSC v.1500 64 bit (AMD64)]
Pandas: 0.10.1
PyLab: 1.7.0
You might be looking for disabling autoclose figure :
still, IPython will show the figure if the last line of a cell return a fig object, you can avoid that by ending it with a
;
or addpass
as the last line.So I guess what you want is this:
To display the plot in another cell simply use: