Skip to main content

首页 / Posts

[OriginPro] Build an Alluvial Diagram in Three Steps: From Data to Styling

This alluvial-diagram tutorial explains the difference between alluvial and Sankey diagrams, then walks through OriginPro data preparation, plotting, and styling for multidimensional categorical data.

Rosetears·
··640 words·4 mins

Introduction: escape island analysis and let data tell a connected story
#

Questionnaire data often includes basic demographic fields such as gender, age, and education. The conventional approach is to draw one pie chart for gender, one bar chart for age, and another bar chart for education. Each chart is clear, but together they are isolated snapshots.

This is island analysis. It tells you how many men and women are in the sample and how age groups are distributed, but not how gender composition differs inside each age group or which education groups concentrate in which demographics.

An Alluvial Diagram solves this by showing how groups flow, split, and merge across categorical dimensions. If ordinary charts are static snapshots, an alluvial diagram is a short data film.


1. What is an alluvial diagram? How is it different from a Sankey diagram?
#

An Alluvial Diagram is a flow diagram for multidimensional categorical data. It visualizes how group composition changes across categories. Think of it as multiple stacked bars connected by ribbons, turning a cross-tabulation into intuitive visual language.

Core components:

  • Steps / axes: vertical columns such as gender, age, and education.
  • Nodes: rectangles in each dimension; height is proportional to count or weight.
  • Flows / links: ribbons connecting adjacent nodes; width represents the number of samples with both attributes.

Alluvial and Sankey diagrams are often confused:

  • Sankey diagrams track quantities such as energy, money, or traffic through a system. Nodes can be freely arranged and may include cycles.
  • Alluvial diagrams show how members such as respondents or customers belong to and regroup across dimensions. Nodes align along vertical axes and flows are usually one-directional.

2. Prepare perfect data
#

This tutorial uses raw data, not pre-counted data. Each row represents one questionnaire record.

GenderAgeEducation
Male<18Associate degree
Female18–25Bachelor’s degree
Male26–30Master’s degree
Female>=31Doctoral degree

3. Draw an alluvial diagram in OriginPro
#

This section uses OriginPro 2025b.

3.1 Import data
#

Start OriginPro and paste the raw data with headers into columns A, B, and C.

3.2 Create the basic chart
#

  1. Set each column as Categorical by right-clicking the column header.
  2. Open the Categories row and define custom order when needed, such as age from youngest to oldest.
  3. Select the categorical columns.
  4. Use Plot → Relationship / Flow → Alluvial Diagram.

3.3 Style the chart
#

Open Plot Details by double-clicking a node or link.

Nodes

  • Set border color to None so attention stays on fills.
  • Use By Points for fill color.
  • Set Gap Between Nodes (%) to about 15 or 20 to avoid crowding.

Links

  • Use source-node color to emphasize origin.
  • Use target-node color to emphasize destination.
  • Use Gradient from source to target for the richest flow effect; this is recommended here.
  • Use a color list when the number of complete paths is small.

Labels

  • Show Name and Total Value.
  • Display count or percentage as needed.
  • Place labels outside nodes and adjust offsets to avoid overlap.

Layout

If the graph fills the page too tightly, fit the page to the layer and reduce the scale, such as to 85%.

Two color logic options under “By Points”
#

  • Indexing: choose a column as the color index. The same category maps to the same color across axes, which is best for reproducible academic figures.
  • Increment: colors are assigned by node order. It is useful for exploratory one-off charts but may change when order or filters change.

Choose Indexing for consistency and Increment for visual variety.


Final notes
#

The value of an alluvial diagram is not simply that it looks good. Its real value is that it explains multidimensional categorical relationships and helps identify key cross-dimensional groups. It turns complex cross-tabs into a readable story line and frees you from isolated single-variable charts. Now open your questionnaire data and let it flow.

Related

[OriginPro] Quickly Draw a Simple Gauge Chart

··231 words·2 mins
This article explains how to quickly draw a 180° gauge chart in OriginPro using a gauge template, including template download, data preparation, and plotting steps to help you create NPS analysis charts easily.

[OriginPro] One-Click Local Zoom-In

··170 words·1 min
This article explains how to use the Zoomed Inset Plus plugin in OriginPro to create a local zoom-in with one click, covering the complete process from plugin download to fine adjustment so users can improve image-processing efficiency.

[OriginPro] Draw a Correlation Analysis Heat Map

··361 words·2 mins
This article explains how to use OriginPro to draw a polished, information-rich correlation heat map and compares it with a Python heat map. The detailed steps help you quickly use the OriginPro plugin and improve your data-analysis visuals.