The behaviour of “%%matplotlib notebook” is different to “%%matplotlib inline”, I’ve attached a screenshot, can you help me figure out if this is my machine or if I’m doing something silly? I am expecting both magics to produces similar behaviour. I’ve seen this issue over the last few months in bigger Notebooks and I figured I had other problems but now I’ve narrowed it down to just the simple case outlined below.
%%matplotlib inline in a Notebook causes plots to be shown as static images, only 1 call to
%%matplotlib inline is required.
%%matplotlib notebook in a Notebook enables some interactive features. I have to call this before every plot otherwise I get a non-rendered object in return.
Here I only use
%%matplotlib notebook. The second plot is not rendered. For the third plot I force another call to
%%matplotlib notebook and the third image is rendered.
Here I first use
%%matplotlib inline and then
%%matplotlib notebook. The final plot (second for
notebook) doesn’t render:
- Linux Mint 17.2 (Ubuntu 14.04) 64bit
- Python 3.4.3 (Anaconda 64 bit)
- IPython 3.2 and Notebook 3.2.0-8b0eef4
- matplotlib 1.4.3
Maybe I’m being foolish and the point of
%%matplotlib notebook is to only allow 1 plot to be interactive, so you have to choose which one? And then after switch back to
Any thoughts to clear up my muddled mind would be gladly received. i.