Assume that I have some data, and I want to create a plot of this data by passing it to a custom plotting function (myplot()). I am using the matplotlib's modules in myplot().
I would like myplot() to return the handle to a figure, and not plot display the plot when I call this function. Here is a sample code and output from iPython.
I have two questions regarding this:
- Why do I still see a plot, even though I am assigning the output of myplot() to f?
- What do I need to supress this plot when I am assigning the output of myplot() to a variable?
If you do not want to start the whole notebook in non-inline-modus you can just use the following code:
Start ipython with
ipython notebook
rather than
ipython notebook --pylab=inline