Use NaN to remove unwanted gap due to missing data in a Plot

9 views (last 30 days)
How do I use NaN to remove the part of the plot between 13:00 and 15:00 due to missing time in the data?
I made a plot with incomplete data and arrived at Image_Plot attached.
Part of the code below. Is there any other method?
test_height(test_height==0) = nan;
height = mean(test_height,2,'omitnan');
%shading flat
%colormap jet
%caxis([0 30])
figure('position',[50 100 1400 300])
shading flat
set(gca, 'TickDir','none')
xlabel('Time (UTC)','FontSize',12,'FontWeight','normal','color','k');
ylabel('Height (km)','FontSize',12,'FontWeight','normal','Color','k');
ylim([3 6])
caxis([-10 30])
  1 Comment
Image Analyst
Image Analyst on 25 Jul 2022
You forgot to attach the data.
If you have any more questions, then attach your data and code to read it in with the paperclip icon after you read this:

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!