Specify the path of X and Y axis (MATLAB)

조회 수: 5(최근 30일)
high speed
high speed 2021년 10월 23일
댓글: high speed 2021년 10월 23일
Dear members,
When I tried to plot this figure, the axes are not the same. X axis start from 0 to 1 with path of 0.1 and that's what I want for Y axis that starts directly with 0.6. I want to change the Y axis as in the case of X one.
How can I do that please.

답변(2개)

Scott MacKenzie
Scott MacKenzie 2021년 10월 23일
After your plot command, add
set(gca, 'xlim', [0 1], 'ylim', [0 1]);
  댓글 수: 2
Scott MacKenzie
Scott MacKenzie 2021년 10월 23일
Do you have >1 plot command? It might help if you post your code.

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


VBBV
VBBV 2021년 10월 23일
Use the following after plot function
yticks([0:0.1:max(y)]) % where y is the y vector/s in your plot
  댓글 수: 1
high speed
high speed 2021년 10월 23일
@VBBV I got this. It doesn't show other values less than 0.6

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by