Contour labels SOMETIMES disappear when plotting contour over pcolor

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

답변 (1개)

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)).

카테고리

도움말 센터File Exchange에서 Contour Plots에 대해 자세히 알아보기

제품

질문:

2015년 1월 30일

답변:

2015년 1월 30일

Community Treasure Hunt

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

Start Hunting!

Translated by