How to show first value on axis cuted with xlim?
Show older comments
I am using xlim to make my axis shorter, but on that way Matlab does not show me first value on shorter axis.
More detailed: I am using command xlim([1 21]); and I need that number 1 on the x axis. How should I correct that, instead of using some graphic programs?
This zero on picture is from vertical axis, I am looking for the first value on the horizontal axis.

Accepted Answer
More Answers (2)
ME
on 28 Jan 2020
I just tried your way and I am getting the zero showing up on the x-axis so I'm not sure what is going on there.
As an alternative you could try using axis instead and see if that helps.
axis([x_min x_max y_min y_max])
1 Comment
ME
on 28 Jan 2020
1 vote
Sorry, that's my fault.
In that case you'll need to change the tick locations - see the below for more information.
Categories
Find more on Mathematics 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!