Scatter plot matrix with grouping variable.
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,...)
P by M matrix
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
grouping variable that determines the marker and color assigned to each point in each matrix
string of color specifications. Default is 'bgrcmyk'
string of marker specifications. Default is '.'
marker size to use for all plots
'on' legends are plotted. 'off' means no legens will be plotted at all
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.
names of the X variables, must be a character array or cell array of strings of the appropriate dimension.
names of the Y variables, must be a character array or cell array of strings of the appropriate dimension.
handle of the plotted points
handle of the subaxes
handle to the figure
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.
loadmatfile(nan_getpath()+"/demos/data/iris.mat"); varNames = {'Sepal Length','Sepal Width','Petal Length','Petal Width'}; nan_gplotmatrix(meas,[],species,'bgrcm',[],[],'on','hist',varNames'); | ![]() | ![]() |