nan_fscatter3 Statistical Visualization nan_gscatter

NaN Toolbox >> NaN Toolbox > Statistical Visualization > nan_gplotmatrix

nan_gplotmatrix

Scatter plot matrix with grouping variable.

Calling Sequence

nan_gplotmatrix(X,Y,G)
nan_gplotmatrix(X,Y,G,CLR,SYM,SIZ)
nan_gplotmatrix(X,Y,G,CLR,SYM,SIZ,DOLEG)
nan_gplotmatrix(X,Y,G,CLR,SYM,SIZ,DOLEG,DISPOPT)
nan_gplotmatrix(X,Y,G,CLR,SYM,SIZ,DOLEG,DISPOPT,XNAM,YNAM)
nan_gplotmatrix(X,[],G,...)
[H,AX,BigAx] = nan_gplotmatrix(...)

Parameters

X:

P by M matrix

Y:

if Y is a P by N Matrix, N by M scatter plots will be created. If y is empty X vs X will be plotted

G:

grouping variable that determines the marker and color assigned to each point in each matrix

CLR :

string of color specifications. Default is 'bgrcmyk'

SYM :

string of marker specifications. Default is '.'

SIZ :

marker size to use for all plots

DOLEG :

'on' legends are plotted. 'off' means no legens will be plotted at all

DISPOPT :

lets you control how to fill the diagonals in a plot of X vs. X. Set DISPOPT to 'none' to leave them blank, 'hist' (default) to plot histograms, or 'variable' to write the variable names.

XNAM :

names of the X variables, must be a character array or cell array of strings of the appropriate dimension.

YNAM :

names of the Y variables, must be a character array or cell array of strings of the appropriate dimension.

H:

handle of the plotted points

AX:

handle of the subaxes

BigAx :

handle to the figure

Description

nan_gplotmatrix creates a matrix of scatter plots of the columns of X against the columns of Y, grouped by G. If Y is [], scatter plots of X vs X will be plotted.

If the number of columns of X is M and the number of columns of Y is N, then N by M scatter plots will be created.

Examples

loadmatfile("demos/data/iris.mat");
varNames = {'Sepal Length','Sepal Width','Petal Length','Petal Width'};
nan_gplotmatrix(meas,[],species,'bgrcm',[],[],'on','hist',varNames');

See also

nan_fscatter3 Statistical Visualization nan_gscatter