ROTATETICKLABEL rotates tick labels. Any arbitrary rotation is acceptable. A demo is included. Right now it only can rotate XTickLabels but it would be easy to modify to rotate YTickLabels.
TH=ROTATETICKLABEL(H,ROT) is the calling form where H is a handle to the axis that contains the XTickLabels that are to be rotated. ROT is an optional parameter that specifies the angle of rotation. The default angle is 90. TH is a handle to the text objects created. For long strings such as those produced by datetick, you may have to adjust the position of the axes so the labels don't get cut off.
Zitieren als
Andrew Bliss (2024). Rotate Tick Label (https://www.mathworks.com/matlabcentral/fileexchange/8722-rotate-tick-label), MATLAB Central File Exchange. Abgerufen.
Kompatibilität der MATLAB-Version
Plattform-Kompatibilität
Windows macOS LinuxKategorien
- MATLAB > Graphics > Formatting and Annotation > Labels and Annotations > Axis Labels >
- MATLAB > Graphics > Formatting and Annotation > Axes Appearance > Limits, Ticks, and Grids > Grid Lines, Tick Values, and Labels >
Tags
Quellenangaben
Inspiriert: kristinbranson/JAABA, Rotate and alternate tick labels on any Xaxis (top or bottom), XYrotalabel - rotate X-axis and Y-axis labels
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Live Editor erkunden
Erstellen Sie Skripte mit Code, Ausgabe und formatiertem Text in einem einzigen ausführbaren Dokument.
Version | Veröffentlicht | Versionshinweise | |
---|---|---|---|
1.0.0.0 | add new keywords |