Put datetime scale in x-axis
Afficher commentaires plus anciens
Hey there. I need to to put datetime scale in x-axis. I attached the values in a xls file.
m3=[x1,x2,x3,x4];
startDate = datenum('10-2006');
endDate = datenum('11-2099');
xdate = linspace(startDate,endDate,373); %number of months
figure
bar(xdate,m3);
dateaxis('x','mm-yyyy','keeplimlits');
legend({'X1','X2','X3','X4'},'Location','Southeast');
Till now, I only got to put the datenum and only x1 appears. When I execute the code below, it runs (exception to datetime scale).
m3=[x1,x2,x3,x4];
figure
bar(m3);
legend({'X1','X2','X3','X4'},'Location','Southeast');
Is it possible to solve it? Thanks :-)
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Dates and Time dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!