Plot imagesc on Discontinuous x-Axis with datenum
2 ビュー (過去 30 日間)
古いコメントを表示
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)
0 件のコメント
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Calendar についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!