필터 지우기
필터 지우기

vertical alignment of x-axis labels in bar charts

조회 수: 19 (최근 30일)
Richard
Richard 2024년 3월 31일
댓글: Adam Danz 2024년 3월 31일
Is there a way to rotate the category-labels on the x-axis in a bar chart?
I've got this code:
x = ["Spring" "Summer" "Autumn" "Winter"];
y = [1 2 3 4];
bar(x,y)
Thanks.

채택된 답변

Voss
Voss 2024년 3월 31일
편집: Voss 2024년 3월 31일
ax = gca();
ax.XAxis.TickLabelRotation = 45; % <- or whatever angle you want

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Axis Labels에 대해 자세히 알아보기

제품


릴리스

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by