Date axis in matlab heatplot
Show older comments
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?
Accepted Answer
More Answers (0)
Categories
Find more on Time Series Objects in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!