Changing horizontal axis to descending order

271 views (last 30 days)
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

Accepted Answer

Robert Cumming
Robert Cumming on 18 Nov 2011
set ( gca, 'xdir', 'reverse' )
  5 Comments

Sign in to comment.

More Answers (1)

Guus Janssen
Guus Janssen on 23 Oct 2018
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!