How to make plot with date tick labels

1 vue (au cours des 30 derniers jours)
varunesh
varunesh le 29 Juil 2018
Réponse apportée : jonas le 29 Juil 2018
Hello,
I have monthly time series data 1901:2005 (1*1260). I want to put months with years on xtick like the attached example figure. Please help me. I am also uploading my data in mat format
Thank you so much in advance.

Réponse acceptée

jonas
jonas le 29 Juil 2018
Very easy if you use the datetime format.
data=load('data.mat');
t=datetime(1901,1:1260,1)
plot(t,data.deseasoned_data)
xtickformat('MMM yyyy')

Plus de réponses (0)

Catégories

En savoir plus sur Dates and Time dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by