Skip to content

plotmatrix

Scatterplot matrix.

[S, AX, BigAx, H, HAx] = plotmatrix(X)
[S, AX, BigAx, H, HAx] = plotmatrix(X, Y)

Draws an n × n matrix of scatterplots — pairwise scatters between every column of X. With two arguments, plots each column of X against each column of Y. Diagonal cells show histograms. Useful for exploratory data analysis.

plotmatrix(rand(50, 4))
  • scatter — 2D scatter plot with optional size and color encoding.
  • subplot — Create or activate one of multiple axes in a grid.