How to begin axis from another value and make it a 0 point in plot matlab?
Show older comments
Hi,
I have some measurements. On the x label they starts from 0 to 100, but from 23 I can see something change on the plot, so I want to show a plot from 23 to 100, and that is how i do this:
plot(x,y)
axis(23, 100, 0, 40)
let's say that y is from 0 to 40 and i don't want to change it.
But now I want to make 23 a 0, so then the 100 whould be 77- how can I make this?
Thanks
Accepted Answer
More Answers (3)
Jos (10584)
on 5 Mar 2018
1) change the limits
plot(x,y)
xlim([23 100])
2) change the data (not recommended)
plot(x,y-23)
KSSV
on 5 Mar 2018
0 votes
xlim([23 100])
Read about xlim and ylim
Magda
on 5 Mar 2018
0 votes
Categories
Find more on Axis Labels 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!


