Places text as a title, xlabel, or ylabel on a group of subplots.
Updated 8 Aug 2018

View License

Editor's Note: This file was a File Exchange Pick of the Week

PLaces text as a title, xlabel, or ylabel on a group of subplots. Returns a handle to the label and a handle to the axis.


returns handles to both the axis and the label.


returns a handle to the axis only. suplabel(text) with one input argument assumes whichLabel='x'

whichLabel is any of 'x', 'y', or 't', specifying whether the text is to be the xlable, ylabel, or title respectively.

supAxes is an optional argument specifying the Position of the "super" axes surrounding the subplots. supAxes defaults to [.075 .075 .85 .85] specify supAxes if labels get chopped or overlay subplots

[ax,h1]=suplabel('super X label');
[ax,h2]=suplabel('super Y label','y');
[ax,h3]=suplabel('super Title' ,'t');

SEE ALSO: text, title, xlabel, ylabel, zlabel, subplot,
suptitle (Matlab Central)

Cite As

Ben Barrowes (2024). suplabel (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2018a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Find more on Labels and Annotations in Help Center and MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes

Now allows text to be a cell array of strings to allow for multiline labels.

Restores visible axes at exit. Now zoomable, etc. at exit.

Modified to restore visible axes on exit. Now zoomable, etc. on exit.

added capability for right side y-label

Default behavior now detects existing axes.