Change xaxis from numbers to dates
Show older comments
I have plotted values over a year, and i would like to change the xaxis from numbers to dates.
This is just an example, but this code should be somewhat the same as what i get when i plot.
x = [1:1:8760];
y = x+5;
figure()
plot(x,y)
So for this year, which is energy values for 2019, i would like the xaxis to only have a value for January 2019 June 2019 and December 2019 as what appears at the xaxis.
I have no idea how to do this, and any help would be very helpfull!
Accepted Answer
More Answers (0)
Categories
Find more on Calendar 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!