parallelplot
Parallel coordinates plot, one line per observation across several variables.
Category: Graphics > 2-D and 3-D Plots
Syntax
parallelplot(data)
Draws one vertical axis per column of the matrix data and one line per row.
parallelplot(tbl)
Uses the numeric variables of a table; variable names label the axes.
parallelplot(___, Name, Value)
Sets options such as 'GroupData', 'CoordinateTickLabels' or 'Jitter'.
p = parallelplot(___)
Also returns the chart object.
Description
Each variable is rescaled onto its own vertical axis, and an observation becomes a line that crosses all of them. Groups of similar observations show up as bundles of lines, and variables that separate groups well show as places where the bundles pull apart.
Input arguments
data- Numeric matrix, rows are observations and columns are variables.
'GroupData'- Grouping variable; each group is drawn in its own color.
'CoordinateTickLabels'- Cell array of labels for the variable axes.
Output arguments
p- ParallelCoordinatesPlot object.
Example
Four variables, two groups
data = [1 5 3 8; 2 6 2 9; 7 1 8 2; 8 2 9 1; 2 5 3 7; 7 2 8 3];
grp = [1; 1; 2; 2; 1; 2];
parallelplot(data, 'GroupData', grp, 'CoordinateTickLabels', {'a','b','c','d'});
In the app, the chart is drawn below the code.