How to change the NaN color
Show older comments
I used a m_map tool
%%%%%%%
figure(1)
set(gcf,'color','w');
m_proj('UTM','lon',[128.3239 128.85],'lat',[34.0496 34.2721]);
hold on;
m_pcolor(lon,lat,TSS); shading flat;
caxis([0 5]);
hc = colorbar('v','YTick',[0 : 5], 'box', 'on');
Pos = get(hc, 'position'); Pos(1) = 0.915; Pos(3) = 0.02; % colorer position [left bottom width height]
set(hc,'position',Pos);
m_grid('box', 'fancy', 'linewidth', 1, 'tickdir', 'in', 'fontsize', 30, 'fontname', 'Arial', 'fontweight', 'bold', 'linestyle', 'none');
xlabel('Longitude', 'fontsize' ,30); ylabel('Latitude', 'fontsize', 30);
%%%%%%
In here, currently, NaN is white but I want to change from white to gray [.7 .7 .7].
I will be looking forward your reply.
Thank you.
2 Comments
Eric Muhlbach
on 2 Nov 2020
Using m_map you can set the background color property using m_grid()
m_grid('BackgroundColor', [0.7 0.7 0.7]);
Accepted Answer
More Answers (0)
Categories
Find more on Data Exploration in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!