Categories &

Functions List

Function Reference: andrewsplot

statistics: andrewsplot (x)
statistics: andrewsplot (x, name, value, …)
statistics: andrewsplot (ax, …)
statistics: h = andrewsplot (…)

Create an Andrews plot of the multivariate data in x.

andrewsplot (x) plots each observation (row) of the n-by-p matrix x as a smooth curve defined by the finite Fourier series

 
 f_i(t) = x_i1/sqrt(2) + x_i2 sin(2*pi*t) + x_i3 cos(2*pi*t)
          + x_i4 sin(4*pi*t) + x_i5 cos(4*pi*t) + …

evaluated over t in the interval [0,1], where x_ij is the j-th variable of the i-th observation.

The following name/value pairs are accepted:

"Group"
A grouping variable (numeric, logical, character, string, or cell array of strings) with one entry per row of x. Curves are colored by group.
"Standardize"
Controls how the columns of x are transformed before the curves are computed: "off" (default) uses the raw data, "on" centers and scales each column to zero mean and unit standard deviation, "PCA" uses the principal component scores, and "PCAStd" uses the principal component scores of the standardized data.
"Quantile"
A scalar alpha in the interval (0,1). Instead of one curve per observation, only three curves per group are drawn: the pointwise median and the alpha and 1-alpha quantiles of the group’s curves.

andrewsplot (ax, …) plots into the axes ax.

The optional output h is a vector of handles to the plotted lines: one per observation, or three per group when "Quantile" is used.

See also: parallelcoords, glyphplot, pca

Source Code: andrewsplot

Andrews plot of Fisher's iris data, grouped by species.

 load fisheriris;
 andrewsplot (meas, "Group", species);
plotted figure

The same data with median and quartile curves per species.

 load fisheriris;
 andrewsplot (meas, "Group", species, "Quantile", 0.25);
plotted figure