Label Rotation in MATLAB 2014
Ältere Kommentare anzeigen
plot(1:3);
set(gca, 'XTICK', 1:3);
set(gca, 'XTICKLABEL', {'aaa', 'bbb', 'ccc'});
set(gca, 'Rotation', 45);
However this gives:
Error using hg.axes/set
The name 'Rotation' is not an accessible property for an instance of class 'axes'.
Have I misunderstood?
2 Kommentare
Carl Witthoft
am 20 Mai 2015
This works: set(get(gca,'YLabel'),'Rotation',-25);
Javier
am 15 Feb. 2017
Just works for labels, not for Ticks.
Antworten (2)
Sean de Wolski
am 15 Sep. 2014
0 Stimmen
In R2014a, you need to replace the tick labels with text which can be rotated. here are a few utilities to help:
3 Kommentare
Matlab2010
am 15 Sep. 2014
Sean de Wolski
am 15 Sep. 2014
The above is R2014a.
R2014b has not shipped and the R2014b prerelease's features are confidential under NDA.
Steven Lord
am 15 Feb. 2017
Now that release R2014b has shipped, I can confirm that tick label rotation was added in that release. See the "Other enhancements and new customization options" paragraph in the "New Visual Look" section of this documentation page.
Mina Kheirkhah
am 29 Jan. 2019
0 Stimmen
Just use: xtickangle(45)
Kategorien
Mehr zu Axis Labels finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!