MATLAB: Change the orientation of the xtick labels
MATLAB
How to change the orientation of the xtick labels while drawing a figure?
Best Answer
There's no way todirectly change the orientation of the xtick labels (using plain old MATLAB). You can try a work-around:
1. Just use a smaller font for the whole figure (I know, not ideal if you have long strings at your tick locations, and it affects not just your xticks)
set(gca,'fontSize',8)
2. Replace xtick labels with your own, oriented string:
You can play with the Y-locations of these text labels to add a little bit of padding away from the x-axis. The downside of this approach is that the xticklabels will no longer update when you resize the figure (but the tick locations themselves will).
Best Answer