Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation: README disagrees with https://matplotlib.org/ipympl/ #454

Open
blthayer opened this issue Apr 5, 2022 · 2 comments
Open

Comments

@blthayer
Copy link

blthayer commented Apr 5, 2022

Describe the issue

The current README specifies that to use ipympl you simply use the following magic:

%matplotlib widget

However, the documentation specifies the following magic:

%matplotlib ipympl

The latter works for my system, while the former does not.

Versions

 3.10.3 (main, Mar 18 2022, 08:05:10) [GCC 9.4.0]
ipympl version: 0.8.8
Selected Jupyter core packages...
IPython          : 8.2.0
ipykernel        : 6.12.1
ipywidgets       : 7.7.0
jupyter_client   : 7.2.1
jupyter_core     : 4.9.2
jupyter_server   : 1.16.0
jupyterlab       : 3.3.2
nbclient         : 0.5.13
nbconvert        : 6.4.5
nbformat         : 5.3.0
notebook         : 6.4.10
qtconsole        : not installed
traitlets        : 5.1.1
Known nbextensions:
  config dir: /home/bthayer/.cache/pypoetry/virtualenvs/opf-7uscUANZ-py3.10/etc/jupyter/nbconfig
    notebook section
      jupyter-matplotlib/extension  enabled 
      - Validating: OK
      jupyter-js-widgets/extension  enabled 
      - Validating: OK
JupyterLab v3.3.2
/home/bthayer/.cache/pypoetry/virtualenvs/opf-7uscUANZ-py3.10/share/jupyter/labextensions
        jupyter-matplotlib v0.10.5 enabled OK
        @jupyter-widgets/jupyterlab-manager v3.1.0 enabled OK (python, jupyterlab_widgets)

@ianhi
Copy link
Collaborator

ianhi commented Apr 6, 2022

The latter works for my system, while the former does not.

That's actually a bit surprising as they should point to same place. See here:

https://github.com/ipython/ipython/blob/7ad0dca1cbabbc564de3ea935ec03f72ce1d815e/IPython/core/pylabtools.py#L35-L36

As for what we should prefer between the two, I'm not sure there is a clear answer. It seems historically that widget was suggested, but to me ipympl makes a lot more sense as it allows discovery of the package via googling.

@orome
Copy link

orome commented Jun 9, 2022

... ipympl makes a lot more sense as it allows discovery of the package via googling.

It also avoids confusion with ipywidgets is in the following misleading fragment

%matplotlib widget
import ipywidgets as widgets

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants