How to change x-axis without changing datapoints?
Show older comments
Hi there,
I am trying to change the labels of XAxis and YAxis. The labels need to start at 0,0 without changing the data points and keep the correct scale. What is the best way to do this?
I tried to change the xticklabels and yticklabels but then the distance between two data points was not the same as on the x-axis.

1 Comment
Dyuman Joshi
on 7 Sep 2023
What should be the values for the tick labels instead of the current values?
Accepted Answer
More Answers (1)
One could meet the request as stated with
xl=xlim; xticklables=xticks-xl(1);
yl=ylim; yticklables=yticks-yl(1);
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!

