Sankey
data-visualizationplotlypythonsankeyflow-diagram
Abstraction: Creating Sankey flow diagrams in Plotly Python
Key points:
- Sankey diagrams are created with
go.Sankeyusingnodeandlinkdicts specifying source/target indices and values - Node position can be controlled via
node.xandnode.y; arrangement modes include snap, perpendicular, freeform, and fixed - Link hover colors are customizable per-link via
link.hovercolor(new in Plotly 5.19) customdataon nodes and links enables rich hovertemplate annotations with arbitrary extra fields- Node alignment supports left, right, center, and justify (default); justify moves terminal nodes to the right
- Figures created with
go.Figureare directly embeddable in Dash apps viadcc.Graph
Connections: Plotly · Dash · Data Visualization · Flow Diagrams