convert Julian day to month

3 次查看(过去 30 天)
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?

采纳的回答

Thomas
Thomas 2012-4-19
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')

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Dates and Time 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by