Clear Filters
Clear Filters

Could anyone help me to solve the issue

1 view (last 30 days)
i want to plot the x-axis in graph in reverse order iused the following command xlim([34,40]); set(gca,'Xdir','reverse'); when i used the above command it reverses the xaxis. but i want to have numbers 40,38,36,34 in the xaxis. Could anyone help me how to avoid the intermediate number 39,37,35.
  1 Comment
Bruno Luong
Bruno Luong on 30 Oct 2018
Can you please try to give the subject more meaningful than "Could anyone help me to solve the issue".

Sign in to comment.

Accepted Answer

Bruno Luong
Bruno Luong on 30 Oct 2018
set(gca,'xtick',(34:2:40))
  3 Comments
Bruno Luong
Bruno Luong on 30 Oct 2018
Edited: Bruno Luong on 30 Oct 2018
Just add (though you already do this)
set(gca,'Xdir','reverse')
Or do all in one instruction
set(gca,'Xdir','reverse','xtick',(34:2:40),'xlim',[34 40])

Sign in to comment.

More Answers (0)

Categories

Find more on 2-D and 3-D Plots in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!