File Exchange

image thumbnail

Rotate and alternate tick labels on any Xaxis (top or bottom)

version 1.1 (1.7 KB) by

Rotate tick labels and alternate them for reading clarity

0 Downloads

Updated

View License

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.

Comments and Ratings (2)

SKOCH

SKOCH (view profile)

I get the same error message..

Lei Cheng

??? Attempted to access b(6); index out of bounds because numel(b)=5.

Error in ==> rotatetl at 55
b2(k/2+.5)=b(k+1);

Updates

1.1

Clarifications

MATLAB Release
MATLAB 7.6 (R2008a)
Acknowledgements

Inspired by: Rotate Tick Label

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video