rotateXLabels( ax, angle, varargin )

Rotate x-tick labels to any angle, preserving font settings and coping with resize, zoom, pan etc

Download
Download

You are now following this Submission

Cite As

Ben Tordoff (2026). rotateXLabels( ax, angle, varargin ) (https://au.mathworks.com/matlabcentral/fileexchange/27812-rotatexlabels-ax-angle-varargin), 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.5.0

Updated license

Download
1.5.0-0

* On MATLAB R2014b, just use XTickLabelRotation instead

Download
1.4.0

Improve behavior when "cla" is called on the axes.

Download
1.3.0

Switch to using data coordinates internally to allow printing to work. Please keep the old version in case this breaks something else!

Download
1.2.0

Should now honour the "XAxisLocation" property of the axes.

Download
1.1.0

Switch to using normalized units for labels to prevent loss of accuracy with hundreds/thousands of labels.

Download
1.0.0

Download