Line Plot with Highest value in the middle

Hi,
Please how can I make a plot with the highest value in the middle while the lowest values at the bottom and top
For example
y -axis has [0, 5, 0]
Thanks

Respuestas (2)

DGM
DGM el 26 de Mayo de 2022
Editada: DGM el 26 de Mayo de 2022
You mean
y = [0, 5, 0];
plot(y)
If you mean something else, you'll have to elaborate.

4 comentarios

TTA
TTA el 26 de Mayo de 2022
Thanks for the prompt reply.
I want the scale either on y or x axis to have the highest value in the middle. Normally we used to have for example, -5, 0, 5. but on my case I have a range of values of three vectors without negative values but I want the maximum to be in the middle. For example, y-axis has a scale of 700 to 1500 to 700.
I hope my explanation is clear.
Thanks
DGM
DGM el 26 de Mayo de 2022
I don't see how that makes sense.
Say that x spans [700 1500 700] and y spans [700 1500 700]. Where is (700,700)? The entire domain is ambiguous except at x = y = 1500.
I doubt that's exactly what you want. It would help if you provide a (minimal) concrete example of what you're trying to do.
TTA
TTA el 26 de Mayo de 2022
I don't mean the two axes at thesame time.
I said either x or y axis having a scale that spans like [700 1500 700] and the other axis having a different time series scale.
I hope my question is clear
Thanks
dpb
dpb el 26 de Mayo de 2022
MATLAB axes are unidirectional by definition and can't be anything else -- and it doesn't make any sense, either.
If the y-axis were to be double-valued, which 700 value is to be used for any given set of x,y data? It's not defined only by the y value, but by the ordinal position in the vector, apparently.
All you could do in this case is plot the data in the time vector and then label tick values correspondingly as wanted independent of what the actual tick values are or have overlaying axes with independent scales and plot into the axes of choice for which piece of the data is associated with that section.

Iniciar sesión para comentar.

Categorías

Más información sobre Graphics Object Properties en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

TTA
el 26 de Mayo de 2022

Respondida:

TTA
el 26 de Mayo de 2022

Community Treasure Hunt

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

Start Hunting!

Translated by