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.

No plots shown with `matplotlib widget`

See original GitHub issue

The widget backend doesn’t seem to work for me. Even very simple plots don’t show up. This issue looks like #171, but for me even simple matplotlib plots don’t show up.

Behaviour with inline backend

%matplotlib inline
import matplotlib.pyplot as plt

plt.plot([[1, 2], [0, 0]])

20211122_16h35m50s_grim

Behaviour with widget backend

%matplotlib widget
import matplotlib.pyplot as plt

plt.plot([[1, 2], [0, 0]])

20211122_16h36m07s_grim

There isn’t a new window with the plot either.

Versions

Distro: Arch Linux Package versions:

ipython 7.29.0-1
python-ipympl 0.8.2-1
python-matplotlib 3.4.3-1
python-ipywidgets 7.6.5-1
python -c "import sys; print('\n',sys.version); import ipympl; print('ipympl version:', ipympl.__version__)" && jupyter --version && jupyter nbextension list && jupyter labextension list
 3.9.7 (default, Oct 10 2021, 15:13:22) 
[GCC 11.1.0]
ipympl version: 0.8.2
Selected Jupyter core packages...
IPython          : 7.29.0
ipykernel        : 6.4.1
ipywidgets       : 7.6.5
jupyter_client   : 6.1.12
jupyter_core     : 4.8.1
jupyter_server   : 1.11.2
jupyterlab       : 3.2.3
nbclient         : 0.5.4
nbconvert        : 6.1.0
nbformat         : 5.1.3
notebook         : 6.4.4
qtconsole        : not installed
traitlets        : 5.1.0
Known nbextensions:
  config dir: /usr/etc/jupyter/nbconfig
    notebook section
      jupyterlab-plotly/extension  enabled 
      - Validating: problems found:
        - require?  X jupyterlab-plotly/extension
  config dir: /etc/jupyter/nbconfig
    notebook section
      jupyter-js-widgets/extension  enabled 
      - Validating: OK
JupyterLab v3.2.3
/usr/share/jupyter/labextensions
        jupyter-matplotlib v0.10.2 enabled OK

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
fwsmitcommented, Jan 5, 2022

Sorry to ask where should I running the above commands? Should i try it in my conda envirment? I get this results and there is still no plots shown in my jupyter notebook cell:

If you’re using anaconda, you should probably use the conda package manager: https://anaconda.org/conda-forge/ipympl

1reaction
specter119commented, Feb 2, 2022

@fwsmit try https://gist.github.com/specter119/721e2ac5a0e54a19978326037271d4dd the aur maintainer miss a json file. the extension can be seen in the jupyter nbextension list

Read more comments on GitHub >

github_iconTop Results From Across the Web

Matplotlib figure not showing up in output widget in first cell of ...
@ImportanceOfBeingErnest I was trying to create a tab widget with plots on each tab, so I had to wrap the plots in output...
Read more >
matplotlib.widgets — Matplotlib 3.6.2 documentation
If there are no references to the widget object it may be garbage collected which will disconnect the callbacks. Attributes:.
Read more >
Matplotlib plots in PyQt5, embedding charts in ... - Python GUIs
Plots from Matplotlib displayed in PyQt5 are actually rendered as simple (bitmap) images by the Agg backend. The FigureCanvasQTAgg class ...
Read more >
Interactive matplotlib does not work : DS-376 - YouTrack
%matplotlib notebook import matplotlib.pyplot as plt plt.plot([0, ... Plot is shown ... No plot. Attachments 2. Screenshot from 2020-05-25 17-33-10.png.
Read more >
Please bring back interactive matplotlib plots! - Kaggle
%matplotlib inline still works, however, I want interactive plots. ... to install ipympl as I showed above and switch to using %matplotlib widget...
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