You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
Rotate tick labels by any degree and alternate them upon and below the X axis for reading clarity, in case of closeby ticks.
Works for top or bottom X axis.
Input: axes handle, rotation in degree, position of the X axis ('top' or 'bottom')
Warning:
1) In case of long tick labels crossing the axis, values u and l in the inputs have to be changed.
2) In case of printing, the option 'middle' instead of 'cap' for the vertical alignment looks better.
Cite As
Fanny Besem (2026). Rotate and alternate tick labels on any Xaxis (top or bottom) (https://www.mathworks.com/matlabcentral/fileexchange/32054-rotate-and-alternate-tick-labels-on-any-xaxis-top-or-bottom), MATLAB Central File Exchange. Retrieved .
Acknowledgements
Inspired by: Rotate Tick Label
General Information
- Version 1.1.0.0 (1.7 KB)
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
