How to increase yticklabel?

조회 수: 4 (최근 30일)
Ali Najem
Ali Najem 2022년 12월 6일
댓글: Ali Najem 2022년 12월 6일
Dear experts,
I have this plot as shown below. I need to increase yticklabel more than 4 I used many ways to do it but still stuck at 4
way1
yticks(1:0.5:5);
yticklabels({'1','1.5','2','2.5','3','3.5','4','4.5','5'})
way2
YTick = 1:0.5:5;
set(gca,'ytick',YTick, 'yTickLabel', strsplit(num2str(YTick)))
The yticklabel doesn't change into what I added! any idea how to fix it?
  댓글 수: 2
VBBV
VBBV 2022년 12월 6일
ylim([1 5]) % check if you use ylim after you plot to restrict value to 4
Ali Najem
Ali Najem 2022년 12월 6일
Thank you so much for your answer it worked

댓글을 달려면 로그인하십시오.

채택된 답변

Dyuman Joshi
Dyuman Joshi 2022년 12월 6일
Change the y-limits
ylim([1 5])
%or more than 5, whatever value is preferable
  댓글 수: 1
Ali Najem
Ali Najem 2022년 12월 6일
Thank you so much for your answer it worked

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by