フィルターのクリア

How can I change the spacing/number of ticks in a figure?

2 ビュー (過去 30 日間)
Carlo Vignali
Carlo Vignali 2019 年 1 月 30 日
コメント済み: Carlo Vignali 2019 年 1 月 31 日
This is basically what I want my graph to look like, but I can't get the yticks to align with the center of each bar so that they can be labeled properly. I've looked at previous posts and havent been able to find a solution.Screen Shot 2019-01-30 at 4.48.07 PM.png
graphValues=rand(24,1);
barh(graphValues)

採用された回答

Ollie A
Ollie A 2019 年 1 月 30 日
This link should help:
It says you can specify the ticks on the y-axis. In your case it would be done as follows:
yticks([1:24])
Hope that helps!
  1 件のコメント
Carlo Vignali
Carlo Vignali 2019 年 1 月 31 日
Yes that finally worked! Thank you so much

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGrid Lines, Tick Values, and Labels についてさらに検索

製品


リリース

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by