how to plot with different distance on vertical axis
Mostrar comentarios más antiguos
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 !

Respuesta aceptada
Más respuestas (1)
Walter Roberson
el 29 de Sept. de 2016
0 votos
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 comentario
John BG
el 30 de Sept. de 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.
Categorías
Más información sobre Annotations en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!