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

Improve the plotly example concerning how to make the thumbnail work #49

Open
smarie opened this issue May 7, 2022 · 0 comments
Open

Comments

@smarie
Copy link
Owner

smarie commented May 7, 2022

We should probably explicitly show the conf.py extract:

import plotly.io as pio
from plotly.io._sg_scraper import plotly_sg_scraper

# Sphinx gallery configuration
pio.renderers.default = "sphinx_gallery_png"  # "sphinx_gallery"
sphinx_gallery_conf = {
    ...
    "image_scrapers": ('matplotlib', plotly_sg_scraper),
}

and we should advise to install kaleido instead of orca as written in https://plotly.com/python/static-image-export/

Finally, the image to show as a thumbail should be displayed using show

from plotly.io import show

fig = ...
show(fig)
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

1 participant