Changing horizontal axis to descending order

Hi all.
Do anyone know how to change the order of xaxis labels in the plot function? Instead of, say, 1 , 2 , 3... i would the axis to plot for ..., 3, 2, 1.
Thank a lot,
Mads

 Réponse acceptée

Robert Cumming
Robert Cumming le 18 Nov 2011
set ( gca, 'xdir', 'reverse' )

5 commentaires

Mads
Mads le 18 Nov 2011
great, ty
Tamim
Tamim le 20 Déc 2016
thanks, worked perfectly.
CHHLONH Chhith
CHHLONH Chhith le 19 Avr 2018
thank in advance
MUSAAB AHMED
MUSAAB AHMED le 3 Sep 2020
Thank you very much
M4000_EE
M4000_EE le 11 Oct 2020
Thanks a lot

Connectez-vous pour commenter.

Plus de réponses (1)

Guus Janssen
Guus Janssen le 23 Oct 2018

0 votes

is there a way to do this for semilogx as well?

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by