See the figure.

1 visualización (últimos 30 días)
Farooq Aamir
Farooq Aamir el 13 de Ag. de 2019
Comentada: Raj el 13 de Ag. de 2019
As from figure we can see that the gragh are in down direction. Now my question is that there any way that we can fix our Y-axis and the direction of gragh should be above?

Respuesta aceptada

Raj
Raj el 13 de Ag. de 2019
Editada: Raj el 13 de Ag. de 2019
So I understand you want your Y axis to be in reverse direction (decreasing from bottom to top) so that your graph comes out in 'upward' direction. In that case use this after your plot command:
set(gca, 'YDir','reverse')
  4 comentarios
Farooq Aamir
Farooq Aamir el 13 de Ag. de 2019
@ Raj thanks again but I want only the graph direction change but the scale of Y axes should be the same by this cammand Y axis scales diapsappear.
Raj
Raj el 13 de Ag. de 2019
When you said "I don't want the scale of Y dimension", I assumed you wanted to make it disappear. Sorry but I am not sure what exactly you are looking for. How can you reverse the graph while maintaining the same Y axis scale (i.e. normal increasing order)? The graph is just a visual representation of your data. So to achieve what you are looking for, you may have to go back to your data source and do some adjustments there to alter the data itself.

Iniciar sesión para comentar.

Más respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by