What's the best way to get Altair plots to show up outside of jupyter/colab/etc UIs?
See original GitHub issueI’d love to build in support for Altair plots in jupyter-book (link). However, I can’t figure out how to get Altair plots to show up there (when the notebooks are converted to markdown, instead of the display code there, the Vega 2 object
output that others have reported is there).
Is there some way to make vega HTML be generated when you convert the notebook, that could then be rendered similar to how ipyleaflet works? (for example, here is an ipyleaflet output converted to markdown w/ nbconvert…it just keeps the raw HTML code). It seemed like the HTML export gets pretty close.
Or, is there a way to get nbconvert to render all the vega plots as high-res PNG when it converts them? From looking at the docs it seems like this would require selenium
Issue Analytics
- State:
- Created 5 years ago
- Comments:20 (18 by maintainers)
Top GitHub Comments
Closing the loop on this: #1793 adds an HTML renderer that works in a variety of environments, including notebook, lab, nbviewer, nbconvert, kaggle, colab, and likely others.
@choldgraf I did some experimenting today to make a vega (and JSON, and VDOM) preprocessor for nbconvert, allowing HTML representations to be embedded in notebooks via a CLI: https://github.com/ian-r-rose/jupyterlab-nbconvert