subplot
Create or activate one of multiple axes in a grid.
Syntax
Section titled “Syntax”h = subplot(m, n, p)h = subplot(h)Description
Section titled “Description”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.
Examples
Section titled “Examples”subplot(2, 2, 1); plot(x, y1);subplot(2, 2, 2); plot(x, y2);See also
Section titled “See also”axes— Create or activate axes within a figure.figure— Create or activate a chart sheet (figure window).plotmatrix— Scatterplot matrix.