How to rotate xaxis labels (bar graph)
Ältere Kommentare anzeigen
I'm having a very difficult time figuring out how to rotate the x-axis labels on a bar graph. If I have the code at the bottom, I get the error Undefined function or variable 'rotateXLabels'.
Error in Test1 (line 5) rotateXLabels(gca, 45);
numbers = magic(5) labels = {'label 1', 'label 2', 'label 3', 'label 4', 'label 5'}; bar(numbers(:,1)) set(gca, 'XTickLabel', labels) rotateXLabels(gca, 45);
Does anyone know how to rotate the axis labels? Thanks
1 Kommentar
Colby
am 10 Mär. 2015
Akzeptierte Antwort
Weitere Antworten (1)
Rae.K
am 7 Nov. 2022
1 Stimme
Kategorien
Mehr zu Labels and Annotations 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!