Skip to content

subplot

Create or activate one of multiple axes in a grid.

h = subplot(m, n, p)
h = subplot(h)

Divides the current figure into an m × n grid of axes and creates / activates the p-th cell (1-based, row-major). Pass an existing handle to activate it without redividing.

subplot(2, 2, 1); plot(x, y1);
subplot(2, 2, 2); plot(x, y2);
  • axes — Create or activate axes within a figure.
  • figure — Create or activate a chart sheet (figure window).
  • plotmatrix — Scatterplot matrix.