How to change the direction of x axis.
9 views (last 30 days)
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.
Star Strider on 21 May 2021
Reversing the axis direction reverses the plot as well.
I = imread('https://www.mathworks.com/matlabcentral/answers/uploaded_files/625258/Captura.PNG');
Ax = gca;
Ax.XDir = 'reverse';
title('X-Axis Direction Reversed')