convert Julian day to month

2 vues (au cours des 30 derniers jours)
Richard
Richard le 19 Avr 2012
Consider the following:
clear all
depths = 1:1:12;
temp = 0 + (20-0).*rand(8760,12);
DateTime = datenum('2011-01-01 00:00','yyyy-mm-dd HH:MM'):1/24:...
datenum('2011-12-31 23:57','yyyy-mm-dd HH:MM');
DateTime = DateTime';
pcolor(DateTime,depths,temp');shading interp
datetick('x','mmm','keepticks','keeplimits');
From this, x10e5 still remains along the xaxis, how do I remove this? Also, all of the month names do not appear, how can I include them?

Réponse acceptée

Thomas
Thomas le 19 Avr 2012
datetick('x','mmm','keeplimits') % remove keepticks to see all months Jan-Dec
Dunno about the 10e5 bit.. might be a bug remnant from pcolor..
here is a linkt hat might help
On my MAC 64 2012a, the following works the trick..
clear all
depths = 1:1:12;
temp = 0 + (20-0).*rand(8760,12);
DateTime = datenum('2011-01-01 00:00','yyyy-mm-dd HH:MM'):1/24:...
datenum('2011-12-31 23:57','yyyy-mm-dd HH:MM');
DateTime = DateTime';
pcolor(DateTime,depths,temp');shading interp
datetick('x','mmm','keeplimits');
set(gcf,'Renderer','zbuffer')

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