subplot
Sets up a plot grid with rows by cols subwindows and sets the current axes for plotting to the location given by index.
Syntax
subplot(rows, cols, index)
subplot(rcn)
Inputs
- rows, cols, index
- Any real number.
- rcn
- 3-digit number with the first digit representing the number of rows, the second representings the number of columns, and the third representing the index.
Example
Simple subplot example:
clf;
subplot(1,2,1);
line([1 2 3], [1 2 3]);
subplot(1,2,2);
line([1 2 3], [3 2 1]);
Comments
When one input is entered, it must be a 3-digit number. The first digit represents the number of rows, the second number represents the number of columns, and the third digit represents the index. If the align option is given, the subwindow boxes will be aligned. If the replace option is given, then the axises of the subplot will be replaced. If the position option is given with the pos variable, the resulting subplot will be precisely positioned at pos.