Have you ever seen a graph like the one below? In recent years, this type of graph has been used in a variety of fields.

Even if you are looking at this graph for the first time, you will probably be able to get a sense of what it means.
This graph is called a "Sankey Diagram."
The graph above is an example of the results of a survey asking about color preferences. The questions "Favorite Color," "Gender," and "Age" are placed on the horizontal axis, and the width of the gaps on each axis is proportional to the percentage of responses.
At a glance, the graph shows trends such as "A higher percentage of people in their 50s prefer blue" and "A higher percentage of women in their 40s prefer purple."
This article will first provide an overview of Sankey diagrams, then show you how to draw Sankey diagrams in JMP using two analytical examples. At the end of the article, there is also a video showing how to do it.
What is a Sankey Diagram?
Sankey diagrams are said to be diagrams that visualize the flow of quantity. They are effective graphs that show the movement of things and changes over time, but they can also be used to show the relationship between categorical variables.
In JMP, you can plot this using the Parallel Plot feature in Graph Builder.
A parallel plot is a graph that plots row values across multiple variables, typically in the form of lines connecting multiple continuous variables, but can also include categorical variables.
When you include a categorical variable, each level (category) is represented as an interval on a parallel line (axis), and the length of the interval is proportional to the number of data at each level of the categorical variable.
Example 1: Examining factors using manufacturing data
The JMP sample data "Powder Metallurgy.jmp" is an automotive parts manufacturing data set. It contains a categorical variable "surface condition" (Pass/Fail) that is one of the objective variables, as well as process data for categorical and continuous variables.

Here, we will use a Sankey diagram to visualize the relationship between the "surface condition" (Pass/Fail) and the categorical process variables that are thought to affect it: "molding method," "compression method," and "sintering method."
Basic Operation
① Select multiple columns to be analyzed at the same time (using the Ctrl or Shift key) and drop them into the [X] zone.
②Click the "Parallel" icon

You can draw a Sankey diagram with just these steps. When you select the line you want to examine on the diagram, it will be linked to other graphs and data tables.
In the figure below, the thick broken line (red) is selected among the cases where the "Surface condition" is Fail.This line connects the molding method: Extrusion, compression method: Cold, and sintering method: Atomosphere, and when tabulating using "Create a table," we can see that this is the combination with the highest failure rate of 23.92%.

Here we have shown an example using categorical variables, but JMP can also create Sankey diagrams that mix continuous and categorical variables.
The figure below is a Sankey diagram using the "surface condition" (a categorical variable) and the continuous process variables "sintering time", "sintering temperature C", and "ratio" that are thought to affect it.

Example 2: Graphing patient flow in a clinical trial
This is an example of graphing "flow" information. The diagram below shows the flow of a clinical trial in which 906 people participated, showing which group the subjects were assigned to (NIC. 15 or Placebo), and the status of each group's progress in the trial (COMPLATED, DEATH, LOST TO FOLLOW-UP).

*This diagram can be created using our product "JMP Clinical."
To visualize this situation with a Sankey diagram, prepare the following data. The number of subjects in each category is entered in column "N".

*For convenience, categories with N=0 are excluded.
*This data can be downloaded from this blog (Study Flow Diagram.jmp).
Here is a Sankey diagram created using this data with the categorical variable specified as [X], "N" as [Size], and "Arm" as [Color].

By representing the data in a graph like this, it is easy to understand the flow and status of the subjects during the trial.
For your reference, here is a video that summarizes the operations in Examples 1 and 2 above. Please take a look. (Note: There is no sound.)
by Naohiro Masukawa (JMP Japan)
Naohiro Masukawa - JMP User Community