How to change the direction of x axis.

15 次查看(过去 30 天)
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.

采纳的回答

Star Strider
Star Strider 2021-5-21
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 个)

Stephan
Stephan 2021-5-21
编辑:Stephan 2021-5-21
A = imread('ngc6543a.jpg');
imshow(A)
B = fliplr(A);
imshow(B)

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

类别

Help CenterFile Exchange 中查找有关 Read, Write, and Modify Image 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by