Plot imagesc on Discontinuous x-Axis with datenum

2 visualizaciones (últimos 30 días)
Siegmund
Siegmund el 13 de Sept. de 2022
I have an imagesc to plot with distance on y axis, z in colorbar, and datenum on x axis. Y and Z are in the matrix (120 x 500) and datetime is in seperate vector t (120 x 1).
I have the following code to plot the imagesc and t, but t only covers data between 6am and 6pm.
How could it make a break in the plot with only showing data for 12 hours with then a break in for example dashed line?
Also, could it be possible to only show the day with the start time and end time (so no label for every xtick)?
figure
tnum = datenum(t);
imagesc(D', 'Interpolation', 'bilinear', 'XData', tnum);
set(gca, 'YDir', 'normal');
colorbar
xticks(tnum);
datetick('x', 'HH:MM', 'keepticks')
set(gca, 'XTickLabelRotation', 45)

Respuestas (0)

Categorías

Más información sobre Axes Appearance en Help Center y File Exchange.

Productos


Versión

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by