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

Export with nbconvert to PDF only shows figures with display(fig) [ipympl-0.8.2] #403

Closed
tovrstra opened this issue Dec 12, 2021 · 2 comments · Fixed by #404
Closed

Export with nbconvert to PDF only shows figures with display(fig) [ipympl-0.8.2] #403

tovrstra opened this issue Dec 12, 2021 · 2 comments · Fixed by #404
Labels

Comments

@tovrstra
Copy link

Describe the issue

When exporting the example notebook as follows, most figures are not shown, except the one with display(fig):

git clone [email protected]:matplotlib/ipympl.git
cd ipympl/examples/
jupyter nbconvert --execute --to pdf ipympl.ipynb

output:

[NbConvertApp] Converting notebook ipympl.ipynb to pdf
[NbConvertApp] Writing 86647 bytes to ipympl.pdf

PDF generated with 0.8.2: ipympl.pdf

This worked better in ipympl-0.8.0, but no longer works in 0.8.1 nor 0.8.2. For reference, this is the PDF generated with ipympl 0.8.0: ipympl.pdf

I believe PR #380 broke this, but I'm not sure. I also cannot judge if this is an ipympl issue, or rather a problem with nbconvert?

Versions

 3.9.7 | packaged by conda-forge | (default, Sep 29 2021, 19:20:46) 
[GCC 9.4.0]
ipympl version: 0.8.2
Selected Jupyter core packages...
IPython          : 7.30.1
ipykernel        : 6.6.0
ipywidgets       : 7.6.5
jupyter_client   : 6.1.12
jupyter_core     : 4.9.1
jupyter_server   : 1.13.1
jupyterlab       : 3.2.5
nbclient         : 0.5.9
nbconvert        : 6.3.0
nbformat         : 5.1.3
notebook         : 6.4.6
qtconsole        : not installed
traitlets        : 5.1.1
Known nbextensions:
  config dir: /home/toon/.jupyter/nbconfig
    notebook section
      splitcell/splitcell disabled
      nbextensions_configurator/config_menu/main  enabled 
      - Validating: problems found:
        - require?  X nbextensions_configurator/config_menu/main
      contrib_nbextensions_help_item/main  enabled 
      - Validating: OK
      spellchecker/main  enabled 
      - Validating: OK
      toc2/main  enabled 
      - Validating: OK
      k3d/extension  enabled 
      - Validating: OK
    tree section
      nbextensions_configurator/tree_tab/main  enabled 
      - Validating: problems found:
        - require?  X nbextensions_configurator/tree_tab/main
  config dir: /home/toon/.local/etc/jupyter/nbconfig
    notebook section
      nbdime/index  enabled 
      - Validating: problems found:
        - require?  X nbdime/index
      rise/main  enabled 
      - Validating: OK
  config dir: /home/toon/miniconda3/envs/py4sci/etc/jupyter/nbconfig
    notebook section
      jupyter-matplotlib/extension  enabled 
      - Validating: OK
      rise/main  enabled 
      - Validating: OK
      voila/extension  enabled 
      - Validating: OK
      jupyter-js-widgets/extension  enabled 
      - Validating: OK
      nbextensions_configurator/config_menu/main  enabled 
      - Validating: problems found:
        - require?  X nbextensions_configurator/config_menu/main
      contrib_nbextensions_help_item/main  enabled 
      - Validating: OK
    tree section
      nbextensions_configurator/tree_tab/main  enabled 
      - Validating: problems found:
        - require?  X nbextensions_configurator/tree_tab/main
  config dir: /etc/jupyter/nbconfig
    notebook section
      jupyter-js-widgets/extension  enabled 
      - Validating: OK
JupyterLab v3.2.5
/home/toon/miniconda3/envs/py4sci/share/jupyter/labextensions
        jupyter-matplotlib v0.10.2 enabled OK
        k3d v2.11.0 enabled OK (python, k3d)
        @jupyter-widgets/jupyterlab-manager v3.0.1 enabled OK (python, jupyterlab_widgets)
        @ijmbarr/jupyterlab_spellchecker v0.7.2 enabled OK (python, jupyterlab-spellchecker)
        @ryantam626/jupyterlab_code_formatter v1.4.10 enabled OK (python, jupyterlab-code-formatter)
        @voila-dashboards/jupyterlab-preview v2.1.0 enabled OK (python, voila)
@martinRenou
Copy link
Member

Thanks for opening an issue.

This worked better in ipympl-0.8.0

I am really surprised by this. I will investigate on this.

@martinRenou
Copy link
Member

You were right in saying 46a955f is the culprit here. Doing some more investigation.

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

Successfully merging a pull request may close this issue.

2 participants