how to label y axis of a graph in horizontal manner

20 ビュー (過去 30 日間)
Sivakumaran Chandrasekaran
Sivakumaran Chandrasekaran 2013 年 5 月 10 日
コメント済み: Welbeck Sintim 2020 年 9 月 6 日
how to label y axis of a graph in horizontal manner... my output should be jan feb march

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2013 年 5 月 10 日
Example
y=[1 2 3 4];
plot(y),
set(gca,'ytick',y,'yticklabel',{'Jan','Feb','March','April'})
  1 件のコメント
Sivakumaran Chandrasekaran
Sivakumaran Chandrasekaran 2013 年 5 月 10 日
check if y=[1 2 4 3]; i am getting error

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

その他の回答 (2 件)

Azzi Abdelmalek
Azzi Abdelmalek 2013 年 5 月 10 日
By default, y ticks are horizontal
  1 件のコメント
Sivakumaran Chandrasekaran
Sivakumaran Chandrasekaran 2013 年 5 月 10 日
jan
feb
march
i should get as like mentioned above

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


David Sanchez
David Sanchez 2013 年 5 月 10 日
Here you are:
ylabel({'jan';'feb';'march'},'Rotation',0)
  2 件のコメント
Sivakumaran Chandrasekaran
Sivakumaran Chandrasekaran 2013 年 5 月 10 日
how to increase space between jan and feb
Welbeck Sintim
Welbeck Sintim 2020 年 9 月 6 日
Thanks for sharing! Works perfectly fine.

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

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by