-
Notifications
You must be signed in to change notification settings - Fork 33
JupyterLab saving plots #74
Comments
There is information on programmatically saving charts here: https://altair-viz.github.io/user_guide/saving_charts.html If by leveraging actions, you mean programmatically clicking the actions buttons in Jupyter via javascript injected into the notebook, I have not tried that but it should be possible in principle. |
I have seen the link and understand why it is required. However, the need to install many tools to "just" save the chart as a png is probably not very user-friendly. Having it integrated in the main package would be more productive in my opinion. |
That would be great, but there's not really any way to do that. Rendering charts currently requires a javascript environment: you can either use a browser to render the charts manually (as in Jupyter/JupyterLab) or render them automatically via extra dependencies (nodejs-based command-line tools, or selenium working with an appropriate headless browser are the two methods I'm aware of). I don't know of any way around that. If you have specific ideas, I'm happy to hear them! |
What about creating platform specific executables using e.g. pkg? |
Since Altair 5.2, the functionality of Altair Saver is now available in Altair via the vl-convert package. Most of the functionality has been available since 5.0, and the main addition in 5.2 was PDF export. See the docs on how to save charts for more details. We are going to archive this repo, so I'm closing all the open issues and PRs before doing so. Try out the new options for saving charts mentioned above and if you run into issues, please open an issue directly in the altair or vl-convert repo. |
It seems that altair is able to save plots out of the box using actions. Could this be leveraged to save the plots to png/svg programmatically?
The text was updated successfully, but these errors were encountered: