-
Notifications
You must be signed in to change notification settings - Fork 89
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
how to save png when not running from jupyter #34
Comments
Hi, the widget only works within the Jupyter notebook (the Sankey diagram is rendered to SVG/PNG in your browser). To run outside Jupyter, if SVG is ok instead of PNG, probably the best way is to export to JSON using $ svg-sankey test.json > test.svg (see This is working for me currently, but note that the JSON format is a work in progress (we're working on a JSON schema specification that will fix it) and is likely to change a bit. If you need PNG you could then convert the SVG images using a tool like |
Relatedly, Matplotlib contains a way to make Sankey plots, though I cannot say whether one is easier or harder to use, and Matplotlib's likely has no real maintainer. But if no interactivity is required, then that may be an option. |
Broken link to svg-sankey above: should be https://github.com/ricklupton/svg-sankey |
@nickynicolson Thanks, updated the link above. |
I installed svg-sankey following the instructions here and exported .json file for the quickstart example. But running svg-sankey on the example I get this error
Not sure how to resolve this. Thanks |
I've got the same error. The lib doesn't working in Jupyter Lab and hasn't ability to save image without Jupyter. It looks like ship in the bottle 😄 Could anyone recommend the alternative library? |
Hi, I can use weave().to_widget().auto_save_png() to save a chart when running from a jupyter notebook
However, I have an application that runs multiple reports from a CLI and I want to include this one. I tried the same .auto_save_png() command as in jupyter, and it doesn't save a png. It doesn't do anything, not even throw an error.
Is it because I should be using a different widget outside of jupyter?
The text was updated successfully, but these errors were encountered: