How do I reverse the y-axis in image?
Afficher commentaires plus anciens
The image function reverses the y-axis so I wanted to reverse it to correct it. I know it has something to do with gca but cannot figure out the right code. Please help me.
Réponse acceptée
Plus de réponses (4)
Chad Greene
le 25 Nov 2014
And another solution:
axis ij
2 commentaires
Iana Ladygina
le 4 Mar 2020
thank you!
Wybekrik
le 24 Avr 2020
Just what i was looking for!
Wagih Abu Rowin
le 5 Oct 2018
12 votes
set(gca,'Ydir','reverse')
1 commentaire
Shushobhit Chaudhary
le 28 Mai 2019
This is the best answer. Thanks a lot. It helped me a lot.
Shane
le 25 Nov 2014
2 votes
Alternatively, you can flip the array. Either fliplr or flipud Flip Left-Right, or Up-Down, depending on how your data is.
plot(X, fliplr(Y))
Jamel
le 7 Juin 2022
0 votes
How do I reverse the "Interference from Satellite Constellation Communication Link" code, where the direction starts from the opposite way.
Catégories
En savoir plus sur Image Arithmetic 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!