matplotlib / ipympl

Matplotlib Jupyter Integration
https://matplotlib.org/ipympl/
BSD 3-Clause "New" or "Revised" License
1.59k stars 225 forks source link

matplotlib.pyplot.figure.show method displays figure two times #482

Open marekhonek opened 2 years ago

marekhonek commented 2 years ago

Describe the issue

matplotlib.pyplot.figure.show method displays figure two times. image

Versions

 3.10.4 (main, Mar 31 2022, 08:41:55) [GCC 7.5.0]
ipympl version: 0.8.7
Selected Jupyter core packages...
IPython          : 8.4.0
ipykernel        : 6.9.1
ipywidgets       : 7.6.5
jupyter_client   : 7.2.2
jupyter_core     : 4.10.0
jupyter_server   : 1.18.1
jupyterlab       : 3.4.4
nbclient         : 0.5.13
nbconvert        : 6.4.4
nbformat         : 5.3.0
notebook         : 6.4.12
qtconsole        : not installed
traitlets        : 5.1.1
Known nbextensions:
  config dir: /home/honek/.jupyter/nbconfig
    notebook section
      [--sys-prefix  enabled 
      - Validating: problems found:
        - require?  X [--sys-prefix
      jupyter-threejs/extension  enabled 
      - Validating: problems found:
        - require?  X jupyter-threejs/extension
  config dir: /home/honek/anaconda3/envs/ipympl_test/etc/jupyter/nbconfig
    notebook section
      jupyter-matplotlib/extension  enabled 
      - Validating: OK
      jupyter-js-widgets/extension  enabled 
      - Validating: OK
JupyterLab v3.4.4
/home/honek/anaconda3/envs/ipympl_test/share/jupyter/labextensions
        jupyter-matplotlib v0.10.5 enabled OK
        @jupyter-widgets/jupyterlab-manager v3.0.0 enabled OK (python, jupyterlab_widgets)
stevejpurves commented 1 year ago

@marekhonek have you seen the note on this behaviour in the docs? https://matplotlib.org/ipympl/examples/full-example.html#without-using-ioff