how to start xlim from 2 rather than 1

2 views (last 30 days)
a = rand(1,33);
bar(a(2:33))
Now i need xlimit for each lines and it should start from 2 and continue with 3 4 5 6.....33

Accepted Answer

Ilham Hardy
Ilham Hardy on 29 Jan 2016
What do you mean by continue with 3 4 5 6 ... 333?
Perhaps something like this?
set(gca,'xlim',[2 33]);
  2 Comments
Stalin Samuel
Stalin Samuel on 29 Jan 2016
  • in the attached figure xlimits are 0 5 10 15 20 25 30 35 (here the interval is 5)
  • I need with interval 1(i.e. 2 3 4 5 6 7 8....33)
Ilham Hardy
Ilham Hardy on 29 Jan 2016
Edited: Ilham Hardy on 29 Jan 2016
What you meant is xtick..
set(gca,'xtick',[2:1:33]);

Sign in to comment.

More Answers (0)

Categories

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

Tags

Products

Community Treasure Hunt

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

Start Hunting!