plotmatrix
Display a matrix of pairwise plots.
📝Syntax
plotmatrix(X)
plotmatrix(X, Y)
plotmatrix(..., marker)
[h, ax, bigax, p, pax] = plotmatrix(...)
📄Description

plotmatrix creates a grid of pairwise plots for the columns of numeric matrices. With one input matrix, the diagonal cells include histograms returned in p, while h contains the scatter line objects.

💡Examples
Create a plot matrix for three variables.
X = [1 2 3; 2 3 5; 3 5 8; 4 7 13; 5 11 21];
plotmatrix(X);
Example illustration
Compare columns from two matrices.
X = rand(30, 2);
Y = [X(:, 1).^2, sin(X(:, 2)), X(:, 1) + X(:, 2)];
plotmatrix(X, Y, 'o');
Example illustration
🔗See Also
scatterhistogramsubplot
Edit this page on GitHub