How to change the direction of x axis.

15 ビュー (過去 30 日間)
Guillermo Arias
Guillermo Arias 2021 年 5 月 21 日
コメント済み: Star Strider 2021 年 5 月 21 日
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 件のコメント
Guillermo Arias
Guillermo Arias 2021 年 5 月 21 日
Okey, thank you very much.
Star Strider
Star Strider 2021 年 5 月 21 日
As always, my pleasure!

サインインしてコメントする。

その他の回答 (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 Center および File ExchangeRead, 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