how to plot with different distance on vertical axis
Afficher commentaires plus anciens
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 !

Réponse acceptée
Plus de réponses (1)
Walter Roberson
le 29 Sep 2016
0 votes
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 commentaire
John BG
le 30 Sep 2016
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.
Catégories
En savoir plus sur Annotations dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!