[ axeshandle, links ] = subplotN( ROWS , COLS, < index , switchorder >)
subplotN(r,c) breaks the Figure window into an R-by-C matrix of small
axes, and returns the axes handles. The axes are placed so that the plot
boxes are aligned, but nothing prevent the labels and ticks from
overlapping. The axes are counted eastward along the top row of the
Figure window.
subplotN(r,c,i) selects the I-th axes for the current plot, and returns
the axe handle.
subplotN(...,'switch') the axes are counted downward along the west
column of the Figure window.
[ ~ , L ] = subplotN(...,'link') the axes properties are linked and
labels are simplified. Outputs are mandatory here.
Example
[ax, hlink1] = subplotN(3,3, 1:2:9,'link') ;
[ax, hlink2] = subplotN(3,3, 2:2:9,'link') ;
disp('Use the 3d orientation tools ...')
Cite As
Fred Massin (2025). subplotN (https://www.mathworks.com/matlabcentral/fileexchange/48720-subplotn), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
- MATLAB > Graphics > Formatting and Annotation > Axes Appearance > Combine Multiple Plots > Subplots >
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 |