Contour labels SOMETIMES disappear when plotting contour over pcolor
4 views (last 30 days)
Show older comments
Hello,
I am plotting black, labeled contours over a pcolor plot. It works fine for some data, but for other data the labels disappear or partially disapear. I cannot find a reason based on the data itself. Any help would be appreciated. Code block below.
Kerry
<<
>>
figure
pcolor(HX,HY,crb_3d(:,:,4));
colormap(jet);
colorbar; shading interp; daspect([1 1 1]);
caxis([-100 100])
hold on
contour(HX,HY,crb_3d(:,:,3),'k','LevelList',[1 5 10 50 100],'ShowText','on');
title('Azimuth CRB minus Elevation CRB','FontWeight','bold')
axis off
0 Comments
Answers (1)
Chad Greene
on 30 Jan 2015
This is sometimes a result of the figure renderer acting funny. Try cycling through the different renderers to see if any of these solutions work
set(gcf,'rend','painters')
If that doesn't work,
set(gcf,'rend','opengl')
And if that doesn't work,
set(gcf,'rend','zbuffer')
And if that still doesn't work, force the contours on top of everything by using contour3 with a Z variable made up of ones(size(Hx)).
0 Comments
See Also
Categories
Find more on Contour Plots in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!