How can I change the spacing/number of ticks in a figure?
조회 수: 4 (최근 30일)
이전 댓글 표시
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.

graphValues=rand(24,1);
barh(graphValues)
댓글 수: 0
채택된 답변
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!
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Axis Labels에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!