I am using datetime ticks to represent the x-axis as given in the following MWE code.
%% random heatmap
h1 = heatmap(rand(60))%% generating the array for the x axis
tstart = datetime(2020,08,21,15,01,0);tend = datetime(2020,08,21,16,00,0);x_time = tstart: minutes(1): tend x_time.Format = 'HH:mm'%% changing the x ticks to be the time
h1.XDisplayLabels = x_time ;
Instead of displaying all the xtick labels, how can I only show the xtick labels every 10 mins, something similar to this {15:10, 15:20, …}.
In addition to that, I want to change the ticks in the colorbar of the heatmap to be something like 'foo 0.1' instead of 0.1.
Could you please help me to sort this out ?
Thank you.
Best Answer