subplotN

For a tight, aligned matrix of axes
136 Downloads
Updated 11 Dec 2014

View License

[ 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 (2024). subplotN (https://www.mathworks.com/matlabcentral/fileexchange/48720-subplotn), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2013a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0.0