Plot Sankey Flow Chart with Python Sankey
Version 1.0.1 (3,12 MB) von
De De
Creates a Sankey Flow Chart by using Python Sankey (Plotly) (https://plotly.com/python/sankey-diagram/)
The following examples show how you can use the Matlab Python Interface to draw the Sankey examples from Python Sankey https://plotly.com/python/sankey-diagram/. The Matlab examples create a Excel file with two sheets. One with information of nodes and one with information of links and values between the nodes.The Python program Sankey.py reads these sheets and plot and saves the chart as a html-file. It is quite interactive in the python viewer, and by hovering the mouse over nodes one can view the incoming and outgoing values. By clicking and moving the mouse, one can move the nodes. With the button "Home" on the top right one can reset the chart.
For Python you need to install Python, I did it with Version 3.9.10 from page https://www.python.org/downloads and install it with path information, so Matlab can find it. Further you need to install the Python Library "plotly" with the command "pip install plotly". It is tested on Windows.
Here are pictures of the three examples:
Zitieren als
Th. D. Ka. (2022). Plot Sankey Flow Chart with Python Sankey (https://www.mathworks.com/matlabcentral/fileexchange/<...>), MATLAB Central File Exchange. Retrieved January 27, 2022.
Kompatibilität der MATLAB-Version
Erstellt mit
R2021b
Kompatibel mit R2021b bis R2022a
Plattform-Kompatibilität
Windows macOS LinuxTags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Live Editor erkunden
Erstellen Sie Skripte mit Code, Ausgabe und formatiertem Text in einem einzigen ausführbaren Dokument.
PySankey
Version | Veröffentlicht | Versionshinweise | |
---|---|---|---|
1.0.1 | correction of description |
||
1.0.0 |