8000 "%matplotlib notebook" required before *every* call to plot? · Issue #4879 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content
"%matplotlib notebook" required before *every* call to plot? #4879
Closed
@ianozsvald

Description

@ianozsvald

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.

The problem:

%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.

mpl_notebook_bug_onlynotebook

Here I first use %matplotlib inline and then %matplotlib notebook. The final plot (second for notebook) doesn't render:

mpl_notebook_bug

I'm using:

  • 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 %matplotlib inline?

Any thoughts to clear up my muddled mind would be gladly received. i.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0