VOOZH about

URL: https://www.geeksforgeeks.org/python/sankey-diagram-using-plotly-in-python/

⇱ Sankey Diagram using Plotly in Python - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Sankey Diagram using Plotly in Python

Last Updated : 15 Jul, 2025

Plotly is a Python library that is used to design graphs, especially interactive graphs. It can plot various graphs and charts like histogram, barplot, boxplot, spreadplot, and many more. It is mainly used in data analysis as well as financial analysis. plotly is an interactive visualization library.

Sankey Diagrams

Sankey diagrams are a type of flow diagram in which the width of the arrows is comparative to the flow rate. Sankey diagrams can also visualize the source to represent the source node, target for the target node, value to set the flow volume and label that shows the node name. If the flow is twice as wide it represents double the quantity.

Example 1:

Output:

👁 Image

Example 2: Styling the graph

Output:

👁 Image
Comment
Article Tags:
Article Tags: