How to change the direction of x axis.

15 visualizaciones (últimos 30 días)
Guillermo Arias
Guillermo Arias el 21 de Mayo de 2021
Comentada: Star Strider el 21 de Mayo de 2021
Hello, i'm working proccesing images with Matlab and i want to change the direction of x axis. Does anyone know how can i do it?. The red are my actual axis, and i want get the white one, so i need to rotate the x axis 180 degrees.
Thank you.

Respuesta aceptada

Star Strider
Star Strider el 21 de Mayo de 2021
Reversing the axis direction reverses the plot as well.
I = imread('https://www.mathworks.com/matlabcentral/answers/uploaded_files/625258/Captura.PNG');
figure
imshow(I)
title('Original')
figure
imshow(I)
Ax = gca;
Ax.XDir = 'reverse';
title('X-Axis Direction Reversed')
.
  2 comentarios
Guillermo Arias
Guillermo Arias el 21 de Mayo de 2021
Okey, thank you very much.
Star Strider
Star Strider el 21 de Mayo de 2021
As always, my pleasure!

Iniciar sesión para comentar.

Más respuestas (2)

Stephan
Stephan el 21 de Mayo de 2021
Editada: Stephan el 21 de Mayo de 2021
A = imread('ngc6543a.jpg');
imshow(A)
B = fliplr(A);
imshow(B)

Guillermo Arias
Guillermo Arias el 21 de Mayo de 2021
Thank you!!. Is there any way to flip the axis instead of the image??

Categorías

Más información sobre Read, Write, and Modify Image en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by