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
Brian Katz (2023). XTICKLABEL_ROTATE (https://www.mathworks.com/matlabcentral/fileexchange/3486-xticklabel_rotate), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Inspired by: XTICKLABEL_ROTATE90
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!
Modified to account for conflict with C:\Program Files\MATLAB\R2016b\toolbox\matlab\graph3d\xticklabels.m
2014 : Allow for multiline labels
Rev.2010. Revisions made to improve functionality in response to various user recommendations.
Use suggested modifications have been integrated. The current version now support TOP xlabels. In addition, the degree of resizing of the axis has been reduced.
Following user comment, modified to allow for additional parameter options for existing XTicks. Subsequently modified to allow for exisiting XTickLabel being defined as cell array (before rotation).