question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ipympl 0.6.1 does not produce figures in jupyter notebook

See original GitHub issue

Describe the issue

TLDR: No figure output in a fresh environment in Jupyter Notebook. It works in Jupyter Lab.

I created a new conda environment, installed and launched jupyter notebook:

conda create --name mpl jupyterlab ipympl matplotlib
conda activate mpl
# which jupyter -> /c/Users/thomasaar/Miniconda3/envs/mpl/Scripts/jupyter
jupyter notebook

I then called the following, and got no output (see screenshot below)

%matplotlib widget
import matplotlib.pyplot as plt
plt.figure()
plt.plot([1,2,3])

image

Running the same notebook in Jupyter Lab works fine. This problem is only related to jupyter notebook.

Versions

ipympl version: 0.6.1
jupyter core     : 4.7.0
jupyter-notebook : 6.1.6
qtconsole        : not installed
ipython          : 7.19.0
ipykernel        : 5.4.2
jupyter client   : 6.1.7
jupyter lab      : 3.0.1
nbconvert        : 6.0.7
ipywidgets       : 7.6.2
nbformat         : 5.0.8
traitlets        : 5.0.5
Known nbextensions:
  config dir: C:\Users\thomasaar\Miniconda3\envs\mpl\etc\jupyter\nbconfig
    notebook section
      jupyter-matplotlib/extension enabled
      - Validating: ok
      jupyter-js-widgets/extension enabled
      - Validating: ok
JupyterLab v3.0.1
C:\Users\thomasaar\Miniconda3\envs\mpl\share\jupyter\labextensions
        jupyter-matplotlib v0.8.1 enabled ok
        @jupyter-widgets/jupyterlab-manager v3.0.0 enabled ok (python, jupyterlab_widgets)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
martinRenoucommented, Jan 5, 2021

This is due to the Webpack update. There is the same issue in ipyleaflet.

1reaction
thomasaarholtcommented, Jan 5, 2021

It’s a pleasure reporting when one gets such responses 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

remark: ipympl-0.6.2 seems to have no interactive feature ...
What is still missing is that the png representation is not shown if the notebook is saved and reload in VS code which...
Read more >
jupyterlab interactive plot - Stack Overflow
1. When using Jupyter notebooks, I tend to use > import matplotlib > matplotlib.use('nbagg') to get an interactive plot with pan/zoom ...
Read more >
mpl_interactions: Easy interactive Matplotlib plots — mpl ...
mpl_interactions' aims to make it as easy as possible to create responsive Matplotlib plots. In particular, you can: Better understand a function's change...
Read more >
ipympl - Matplotlib
ipympl enables using the interactive features of matplotlib in Jupyter ... to have interactive plots so by default the outputs on this page...
Read more >
Jupyter Lab ipywidgets no longer work with ipympl?
I have consistently used the following workflow for fully updating my Jupyter Lab working environments: $ rmvirtualenv my_env $ mkvirtualenv --python=`which ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found