ricklupton / ipysankeywidget

IPython / Jupyter Sankey diagram widget
MIT License
174 stars 24 forks source link

render image from ipython (not jupyter notebook) #46

Closed alexbovet closed 4 years ago

alexbovet commented 4 years ago

Hi,

I would like to use ipysankeywidget from an IPython terminal (from spyder actually) to generate Sankey diagram. If I try the simple example, I can do everything without any error but nothing is displayed.

Is it possible to output the result in a html or svg file from an IPython terminal? I didn't find anything in the documentation.

Thanks for this great project!

ricklupton commented 4 years ago

Hi,

ipysankeywidget only works within Jupyter Notebook or Jupyter Lab. If you want to create Sankey diagrams outside of that, try saving the data as a JSON file and using svg-sankey which uses the same underlying library for doing the rendering -- does that do what you're looking for?

alexbovet commented 4 years ago

Thanks! Using .to_json() from a SankeyData created from weave does the trick.