Single non-linear x axis in figure
Show older comments
I have the following data set of deformation over time (first figure). A lot of the deformations are occuring during the first day, which I would like to more emphasis to by a piecewise linear time scale on the x axis, see my sketch below (second figure).
I would love if someone could show me how this can be done!


Answers (2)
Gustaf Larsson
on 5 Feb 2019
KSSV
on 5 Feb 2019
Read about xlim. Read about axis. Also you can pick your required data using logicals.
Let t,y be your data.
idx = t<5 ;
t1 = t(idx) ;
y1 = y(idx);
plot(t1,y1)
3 Comments
Gustaf Larsson
on 5 Feb 2019
KSSV
on 5 Feb 2019
have a look on interp1
Gustaf Larsson
on 5 Feb 2019
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!