Imagesc with datetime on x axis
Afficher commentaires plus anciens
I'd like to use imagesc to plot a matrix with distance on y axis, z in colorbar, and datetime on x axis. Y and Z are in the matrix (12 x 500) and datetime is in seperate vector t (12 x 1).
I have the following code but the datetime that shows up on the x axis is January 1, January 2, ... (from 1 - 12).
If I add t, the imagesc doesn't show up.
How can I plot the 12 x 500 matrix and plot t as x axis?
figure
imagesc(D', 'Interpolation', 'bilinear');
set(gca, 'YDir', 'normal');
colorbar
set(gca, 'XTick', t);
datetick('x', 'mmmm dd HH:MM', 'keepticks')
1 commentaire
Siegmund
le 13 Sep 2022
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Axis Labels dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!