Hi, I have a plot from matlab as show. However, I would like to format the scaling of y axis insuch a that upper limit is 1 and lower limit is 0.7. I have tried none of them works. Could you please help me so that I can truncate the plot by decimal place.
This will help me a lot.
Thanks in advance. Mahesh

 채택된 답변

Geoff Hayes
Geoff Hayes 2014년 11월 25일

2 개 추천

Mahesh - try using ylim to set the y-axis limits. In your case, the code would be
ylim([0.7 1]);

댓글 수: 5

Mahesh
Mahesh 2014년 11월 25일
편집: Image Analyst 2014년 11월 25일
Thanks Hayes,
There will be no problem if we are doing it manually. But what if we do not know the bounds? In this case, how we can compute the bound? I am concerned with this.
Geoff Hayes
Geoff Hayes 2014년 11월 25일
Mahesh - what do you want the bound to be? Should the lower bound be something less than the minimum value that is being plotted? Should the upper bound be something greater than the maximum value that is being plotted? It is up to you to determine how to compute the bounds
Image Analyst
Image Analyst 2014년 11월 25일
So just pick something at random. If you don't know what the bounds are , or should be, then you will not know if you're wrong. I mean, who's to say you picked wrong values if you don't know what's wrong and what's right?
Mahesh
Mahesh 2014년 11월 25일
In this sense, I want to truncate the axis like corresponding to 0.718 as 0.6 in lower value and 0.9 in upper value. So I am looking a way to convert like this so that I can set into axis limits. Thanks
Mahesh
Geoff Hayes
Geoff Hayes 2014년 11월 25일
Mahesh - but that is your choice to set the limits. Why 0.6 and not 0.7? What is 0.718 - the minimum value on the y-axis or something else?

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Axis Labels에 대해 자세히 알아보기

태그

질문:

2014년 11월 25일

댓글:

2014년 11월 25일

Community Treasure Hunt

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

Start Hunting!

Translated by