フィルターのクリア

vertical alignment of x-axis labels in bar charts

10 ビュー (過去 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
  3 件のコメント
Voss
Voss 2024 年 3 月 31 日
You're welcome!
Adam Danz
Adam Danz 2024 年 3 月 31 日
See also xtickangle.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeBar Plots についてさらに検索

製品


リリース

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by