Statistical Visualization Statistical Visualization nan_boxplot

NaN Toolbox >> NaN Toolbox > Statistical Visualization > nan_andrewsplot

nan_andrewsplot

Andrews plot for multivariate data.

Calling Sequence

h = nan_andrewsplot(X)
h = nan_andrewsplot(X,groups)
h = nan_andrewsplot(X,groups,quant)
h = nan_andrewsplot(X,groups,quant,stdize)

Parameters

X :

Rows of X correspond to observations, columns to variables.

groups:

plots the data in different groups with different colors, must be a numeric array or character matrix,

quant:

if it is not empty it plots only the median and the quant and (1-quant) quantiles of f(t) at each value of t. This is useful if X contains many observations.

stdize = 'off' :

do nothing

stdize ='on' :

scales each column of X to have zero mean and unit standard deviation before making the plot.

stdize = 'pca' :

creates an Andrews plot from the principal component scores of X, in order of decreasing eigenvalue.

stdize = 'pcastd' :

uses the standardized principal component scores.

h:

handles to the line objects

Description

nan_andrewsplot(X) creates an Andrews plot of the multivariate data in the matrix X.

An Andrews plot is a tool for visualizing high dimensional data, where each observation is represented by a function, f(t), of a continuous dummy variable, t, over the interval [0,1]. f(t) is defined for the i-th observation in X as

f(t) = X(i,1)/sqrt(2) + X(i,2)*sin(2*pi*t) + X(i,3)*cos(2*pi*t) + ...

andrewsplot treats NaNs in X as missing values, and ignores the corresponding rows.

Examples

// make a grouped plot of the raw data
loadmatfile("demos/data/iris.mat");
nan_andrewsplot(meas,species);

// plot only the median and quartiles of each group
nan_andrewsplot(meas,species,.25);

Bibliography

[1] Gnanadesikan, R. (1977) Methods for Statistical Dara Analysis of Multivariate Observations, Wiley.

See also

Statistical Visualization Statistical Visualization nan_boxplot