how to plot with different distance on vertical axis
이전 댓글 표시
Hi guys , i have a vector x and a vector y. i want to plot(x,y) but i want : in vertical axis ,the distance from value: 0 to value: 10 is as long as the distance from value: 11 to value: 100 . I don't know how i can do that . Can you help me ? .Thank you very much !

채택된 답변
추가 답변 (1개)
Walter Roberson
2016년 9월 29일
0 개 추천
In your diagram, you appear to be using linear from 1 up to 10, and then log. There is no built-in facility for that.
What you might be able to do is grab a routine from the File Exchange such as Break Y Axis and once you have used that to split your range, set the upper axes to be log.
I have not investigated to see whether the code there automatically handles Datatips, or whether you need to break up your lines yourself into two parts.
In your text request you are asking for support starting from 0 . This is why I say you are asking for linear: in any log plot, the distance from 1/100 to 1/10 would be the same as the distance from 1/10 to 1 which would be the same as the distance from 1 to 10, and so on. You cannot display all the way down to 0 on a log plot, because log(0) is -infinity.
댓글 수: 1
John BG
2016년 9월 30일
Dear Walter
my impression is that the question revolves around the values of the axis not the function values.
So to go from [1:step1:1e3] to let's say [0:step2:3] all you need is the logarithm.
Also the question was rewarded from asking about the axis x to asking about the axis y. Some questions are more challenge to get to understand the problem asked rather than the problem itself or what we may guess that the problem is.
카테고리
도움말 센터 및 File Exchange에서 Annotations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!