Menu

Diagrams
Static
37 Python scripts generated for alluvial diagram this week

Alluvial Diagram

Chart overview

An alluvial diagram visualizes the flow and redistribution of observations between categorical states across multiple time points or stages.

Key points

  • Unlike a Sankey diagram that emphasizes quantities of flow, an alluvial diagram focuses on grouping and tracking how entities transition between categories: patients progressing through clinical stages, cell populations changing phenotype over a time course, or species composition shifting across ecological sites.
  • Each vertical column represents a categorical variable at one stage, and the alluvia (ribbons) connecting columns are proportional in width to the number of observations flowing between states.
  • The color of each ribbon typically encodes the source or destination category.

Example Visualization

Alluvial diagram showing patient flow between clinical response categories at three treatment timepoints

Create This Chart Now

Generate publication-ready alluvial diagrams with AI in seconds. No coding required – just describe your data and let AI do the work.

View example prompt
Example AI Prompt

"Create an alluvial diagram from my longitudinal clinical data showing patient transitions between response categories (CR, PR, SD, PD) at baseline, 3 months, and 6 months. Width of ribbons proportional to patient counts. Color ribbons by baseline category. Label each category block with the count and percentage. Use a white background and distinct categorical colors. Format for a clinical journal at 300 DPI."

How to create this chart in 30 seconds

1

Upload Data

Drag & drop your Excel or CSV file. Plotivy securely processes it in your browser.

2

AI Generation

Our AI analyzes your data and generates the Alluvial Diagram code automatically.

3

Customize & Export

Tweak the design with natural language, then export as high-res PNG, SVG or PDF.

Python Code Example

Loading code...

Console Output

Output
Figure saved: plotivy-alluvial-diagram.png

Common Use Cases

  • 1Tracking patient clinical response category transitions over serial treatment assessments
  • 2Single-cell RNA-seq trajectory: showing cell state redistribution between timepoints after stimulation
  • 3Gut microbiome study: visualizing community state transitions across dietary intervention phases
  • 4Epidemiology: displaying population movement between disease severity grades over a surveillance period

Pro Tips

Sort categories consistently at each column to minimize ribbon crossings and improve readability

Use color to encode one meaningful variable - source category or a biologically relevant grouping

Keep the number of stages (columns) to three or four maximum before the diagram becomes uninterpretable

Label the width of each block with the absolute count so proportions are quantitatively grounded

Free Cheat Sheet

Scientific Chart Selection Cheat Sheet

Not sure whether to use a Violin Plot, Box Plot, or Ridge Plot? Download our single-page reference mapping the most-used scientific chart types, exactly when to use them, and the core Matplotlib/Seaborn functions.

Comparison Charts
Distribution Charts
Time Series Data
Common Mistakes
No spam. Unsubscribe anytime.