Main Content

Scatter plot matrix

`plotmatrix(`

is the
same as `X`

)`plotmatrix(X,X)`

except that the subaxes
along the diagonal are replaced with histogram plots of the data in
the corresponding column of `X`

. For example, the
subaxes along the diagonal in the *i*th column
is replaced by `histogram(X(:,i))`

.

`plotmatrix(___,`

specifies
the line style, marker symbol, and color for the scatter plots. The
option `LineSpec`

)`LineSpec`

can be preceded by any of the input
argument combinations in the previous syntaxes.

`[`

returns the graphic objects
created as follows:`S`

,`AX`

,`BigAx`

,`H`

,`HAx`

]
= plotmatrix(___)

`S`

– Chart line objects for the scatter plots`AX`

– Axes objects for each subaxes`BigAx`

– Axes object for big axes that frames the subaxes`H`

– Histogram objects for the histogram plots`HAx`

– Axes objects for the invisible histogram axes

`BigAx`

is left as the current axes (`gca`

)
so that a subsequent `title`

, `xlabel`

,
or `ylabel`

command centers text with respect to
the big axes.

`scatter`

| `scatter3`

| `tiledlayout`

| `nexttile`