XTICKLABEL_ROTATE
Editor's Note: This file was a File Exchange Pick of the Week
A modified version of XTICKLABEL_ROTATE90, this version allows for arbitrary angle rotation and most importantly the use of text labels. In addition, an attempt is made to adjust the size and placement of the axis and xlabel to accommodate the new labels.
Example : %Use text labels rotated 45° without tex interpreter
boxplot(randn(5,5),1)
xticklabel_rotate([1:5],45,{'label_1','label_2','label_3','label_4','label_5'},'interpreter','none')
Cite As
Brian Katz (2022). XTICKLABEL_ROTATE (https://www.mathworks.com/matlabcentral/fileexchange/3486-xticklabel_rotate), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Acknowledgements
Inspired by: XTICKLABEL_ROTATE90
Inspired: Rotate XTick Labels for multi-axes, yticklabel_rotate, XYrotalabel - rotate X-axis and Y-axis labels, iahncajigas/nSTAT
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.