Invert x-axis

Solved
Celeborn Posted messages 22 Status Member -  
 antoine -
Bonjour,

I am looking to reverse the x-axis of a graph in MATLAB so that it goes from the highest values to the lowest.

I found the "axis" function, but it only reverses the y-axis (by using axis['ij']), and when typing axis[Xmin Xmax Ymin Ymax], Xmin must be less than Xmax, otherwise there is a bug during compilation.

Thank you in advance for any possible solution.
Configuration: Linux Mozilla 1.4.3

3 answers

  1. anonyme
     
    Property YDir and XDir of the axes: set(gca,'XDir','reverse')
    14
  2. Celeborn Posted messages 22 Status Member 4
     
    Well, I added a ""-"" in front of x in the plot, but I would like positive values to scale my axes... second challenge!

    Thank you in advance :-)
    1