Here is my scirpt to make temp of different date.
%%"date" is a matix which show values of date. For that I have converted the dates into number in excel and using those numbers to plot
%% 'b' show the different locations for those I am plotting the airtemp.
%% "temp" is a matrix having the temperature of different location at different dates.
heatmap(date,b,temp);
annotation('textarrow',[1,1],[0.5,0.5],'string','T(°C)','FontSize',16,...
'HeadStyle','none','LineStyle','none','HorizontalAlignment','center',...
'FontName','Times New Roman','FontWeight','bold','TextRotation',90);
colormap(flipud(pink));
title({('T')});
names_1= {'Point 1','Point 2','Point 3','Point 4','Point 5','Point 6','Point 7'};
ax = gca;
ax.YData=names_1;
ax.XLabel='Date';
ax.FontSize = 16;
ax.FontName='Times New Roman';
Now I want to convert x-tick into date. Please tell me how I can do that?

 채택된 답변

dpb
dpb 2021년 2월 14일

0 개 추천

" I have converted the dates into number in excel and using those numbers to plot"
Don't do that!!!
Read the dates as datetime in to begin with -- then heatmap will automagically use a date axis.
I'd suggest using
detectImportOptions
readTable
will lead you to easier solution path.

댓글 수: 1

AKSHANSHA CHAUHAN
AKSHANSHA CHAUHAN 2021년 2월 15일
Can you please modify this script for that process?

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Time Series Objects에 대해 자세히 알아보기

태그

질문:

2021년 2월 14일

댓글:

2021년 2월 15일

Community Treasure Hunt

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

Start Hunting!

Translated by