convert Julian day to month

2 Ansichten (letzte 30 Tage)
Richard
Richard am 19 Apr. 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?

Akzeptierte Antwort

Thomas
Thomas am 19 Apr. 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')

Weitere Antworten (0)

Kategorien

Mehr zu Dates and Time finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by