subplotN

For a tight, aligned matrix of axes

You are now following this Submission

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

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.0.0