Parallel coordinates plot: compare many variables per row
A parallel coordinates plot draws one vertical axis per variable, side by side, and represents each row of data as a line that crosses every axis at that row's value. A batch with five recorded settings becomes a zigzag across five axes. When rows are colored by outcome, such as pass and fail, you can see at a glance which variables separate the groups: the good lines and the bad lines bunch apart on those axes and mix together on the others.
When to use it
- Each item (a batch, a lot, a run, a part) has several numeric measurements, and you want to compare items across all of them at once.
- You have good and bad items and want to find the variables on which they differ, as in a product/process search.
- You want to spot items whose combination of values is unusual even though no single value is extreme.
- There are too many variables for a matrix plot to stay readable, but few enough rows (up to a few hundred) for lines to be followed.
How it works
- Draw one vertical axis per variable, evenly spaced.
- Scale each axis on its own, since the variables have different units. The most common scaling maps each variable's minimum to the bottom and its maximum to the top:
scaled value = (x − min) / (max − min)- For each row, mark its scaled value on every axis and join the marks with straight segments.
- Color the lines by a grouping variable or outcome, and draw the group of interest last so it stays on top.
Two choices change the picture. Axis order matters, because you only see relationships between neighboring axes: lines running parallel between two axes mean a positive relationship, and lines crossing in an X mean a negative one. Axis direction can be flipped so that a negative relationship also shows as parallel lines. A good tool lets you reorder and flip axes.
Example
A coatings plant made 8 batches of a resin. Viscosity must not exceed 1,600 cP, and three batches failed. For each batch, the records hold the reactor temperature, the pH, the mixing time and the catalyst level:
| Batch | Temperature (°C) | pH | Mix time (min) | Catalyst (%) | Viscosity (cP) | Result |
|---|---|---|---|---|---|---|
| 1 | 78 | 6.8 | 42 | 1.2 | 1,450 | Pass |
| 2 | 82 | 6.6 | 38 | 1.1 | 1,510 | Pass |
| 3 | 80 | 6.9 | 45 | 1.3 | 1,430 | Pass |
| 4 | 85 | 6.1 | 40 | 1.2 | 1,820 | Fail |
| 5 | 79 | 6.7 | 36 | 1.0 | 1,480 | Pass |
| 6 | 86 | 6.0 | 44 | 1.1 | 1,880 | Fail |
| 7 | 81 | 6.5 | 39 | 1.3 | 1,530 | Pass |
| 8 | 84 | 6.2 | 41 | 1.2 | 1,760 | Fail |
Each axis runs from the variable's minimum to its maximum: temperature 78 to 86 °C, pH 6.0 to 6.9, mix time 36 to 45 min, catalyst 1.0 to 1.3%, viscosity 1,430 to 1,880 cP. Batch 4, for example, sits at (85 − 78) / 8 = 0.88 on the temperature axis, (6.1 − 6.0) / 0.9 = 0.11 on pH, 0.44 on mix time, 0.67 on catalyst and (1,820 − 1,430) / 450 = 0.87 on viscosity.
With the axes in the order of the table and the failed batches in a contrasting color, the plot shows:
- Temperature: the three failed lines start at the top (84 to 86 °C); all passing lines start at 82 °C or below.
- pH: the failed lines drop to the bottom (6.0 to 6.2), the passing ones stay at 6.5 or above. Between these two axes nearly every line crosses, the X pattern of a strong negative relationship (r = −0.94).
- Mix time and catalyst: the failed lines are spread across the whole range, mixed in with the passing ones. Neither variable separates the groups.
- Viscosity: the failed lines end high, as they must.
The plot narrows four candidate inputs to two suspects: temperature and pH. It cannot say which one matters, because in these batches they moved together; a hot batch was always a low-pH batch. A small experiment that varies them independently, or a check of the chemistry, is the next step.
How to read the results
- Separation on an axis (good lines in one region, bad in another) marks a variable related to the outcome.
- Mixing on an axis means that variable does not distinguish the groups in these data.
- Parallel segments between neighboring axes mean a positive relationship; crossing segments mean a negative one.
- A lone line that leaves the bundle on one axis is an unusual item worth checking.
Common mistakes
- Reading relationships between axes that are not neighbors. Reorder the axes to compare a different pair.
- Too many lines. Hundreds of overlapping lines turn into a solid band. Use transparency, highlight one group, or summarize groups by their median lines.
- Forgetting the scaling. Each axis has its own range; a line at the top of two axes does not mean the two values are equal.
- Taking separation as cause. Like any look at historical data, the plot shows association. Variables that move together, like temperature and pH here, cannot be told apart.
Frequently asked questions
How do you read a parallel coordinates plot?
Follow the bundles, not single lines. Look for axes where groups of lines separate, for crossings between neighboring axes (negative relationships) and for lines that leave the bundle.
How should the axes be scaled?
Usually each from its own minimum to its maximum. When variables share units and a common range matters, such as several temperatures, use a common scale instead.
How many variables can it show?
Many more than a matrix plot: 10 to 20 axes stay readable, as long as the number of lines is moderate.
What is the difference from a matrix plot?
A matrix plot shows every pair of variables in its own scatterplot, which is better for the shape of each relationship. A parallel coordinates plot shows every variable of every row at once, which is better for comparing whole profiles and groups.