Skip to content

plotmatrix

plot · scripts/plot/draw/plotmatrix.m

: plotmatrix (x, y)
: plotmatrix (x)
: plotmatrix (…, linespec)
: plotmatrix (ax, …)
: [s, ax, bigax, h, hax] = plotmatrix (…)

Scatter plot matrix (MATLAB Graphics / R2026a).

For the m-by-p matrix x and the m-by-q matrix y a grid of q rows and p columns of axes is created; the axes in row i and column j plot y(:,i) against x(:,j). Row 1 is at the top. Vectors count as single columns. With only x the columns are plotted against each other and a histogram of each column is drawn on top of the diagonal scatter axes.

The outputs are the line handles s (q-by-p), the axes handles ax (q-by-p), the invisible spanning axes bigax, the diagonal histogram handles h, and the histogram axes hax.