Do you have any experience assigning the color for all sequences in a Sankey Plot with the SAME color category? The challenge I encountered was that each sequence had a different color category, making it difficult to track the change of items from sequence 1 to 2... to n with the same color assigned.
Created:
Jul 24, 2025 03:25 PM
| Last Modified: Jul 24, 2025 12:27 PM(538 views)
| Posted in reply to message from Victor_G 07-24-2025
Hi @qunw , Could you please post an (anonymized) example of the issue you experience?
On my side, I wish I could use Sankey plots to monitor state changes - of "properties" during a process flow. e.g. with different categories of pass and fail.
In a Sankey plot, color doesn't indicate the value per category, it indicates "groups". (red on the left of the diagram are the same rows of the data table as red on the right - anywhere else in the plot.) Is this what you describe with "each sequence had a different color category"?
As a consequence - in the below example, e.g. blue can "be" 0 on the left, and blue in the center and on the right:
On the other hand, from how the plot works, it doesn't make sense to give all "1"s with the same color.
But how to "find" the 1s in a complicated Sankey plot. If they don't have the same color?
Unfortunately: JUST BY THE LABELS !
And how to find "state" changes - e.. from 0 to 1. -> close to impossible "by the naked eye" - it just works with heavy load on the brain-coprocessor:
Different to a Sankey plot for continuous values:
... for columns with nominal modeling type the same value can be at rather different positions along the Y axis. This makes it very hard to detect "state" changes for Sankey plots with nominal values.
There could be an option to switch from the nominal mode to a quasi "continuous mode" - with same values on the same height - but with the cool additional feature to track "population" by the width of the "tubes"
I learned this graph from a community post, which provided another way of visualizing a related question, such as tracking the diversity of each regimen in the initial treatment and subsequent treatments. I figured out a way to generate it by labeling each value in the following Outflows with the value in Outflow 1 as the prefix if they are from the same value in Outflow 1, such as 'Auto', 'Home', 'Taxes', etc. This requires some data preprocessing to make it happen. Hope you have a better way to do it. Many thanks!
Thanks so much, Hogi, for helping me with this query and sharing the examples! I used the Sankey plot for patient treatment profiling and tried to assign the same colors to the same regimens in the sequence of treatments. My case is quite similar to your example. You were correct about my description of "each sequence had a different color category." The "value 1, 2 and 3" on x-axis like "treatment 1, 2, and 3", and "value 0, 1, 2" like regimens per treatment. I would like to synchronize the color setting of 0, 1, and 2 in each "value 1, 2, and 3", where "1" is red, "2" is green, and "0" is blue across value 1, 2, and 3. So that will help to understand the patients' treatment journey. Please let me know if you have any solution for it—many thanks.
I would like to synchronize the color setting of 0, 1, and 2 in each "value 1, 2, and 3", where "1" is red, "2" is green, and "0" is blue across value 1, 2, and 3.
Ok, understood.
I fear, this is not possible (and not intended) via Sankey plot.
In GraphBuilder, colors can be assigned via Row States or the Color Dropzone. In both cases, the color is defined 'by row'.
Therefore, when you select a trajectory in the plot, a specific row is selected. The color of the trajectory is defined by the color of this row. One trajectory, one color.
Created:
Jul 29, 2025 02:33 AM
| Last Modified: Jul 29, 2025 1:47 AM(473 views)
| Posted in reply to message from hogi 07-29-2025
The Heatmap plot contains all the information - but: it is surprising how many co-processing by the human brain in needed to "understand it".
Closer to the Sankey plot - with treatment indicated by color AND position along the y axis. -> less coprocessing needed - much easier to see the information by the naked eye.
Even closer to Sankey -- with all trajectories in one plot,
the graph gets very busy and it's not possible anymore to follow specific trajectories.