필터 지우기
필터 지우기

How to change axis label and box colour when using pcolor with contours

조회 수: 3 (최근 30일)
mttxc12
mttxc12 2016년 1월 15일
I'm producing plots in a row with insets using the 'axes' command. All the plots are pcolor surface plots with overplotted contours. I'd like the inset plots to have a white border and white numbers along the x and y axes, so that it stands out from the background, but the contours within the plot to remain black. I can't seem to isolate those properties. I've tried the following (I'm producing the plots in a row using the subplot command, I'm not sure if that has any relevance). I have to set the 'EdgeColor' to 'none' otherwise I get grid marks all through the plot and that's not what I want.
subplot(1,3,3)
shading interp
colormap(jet)
hold on
NP=pcolor(Xsurf,Ysurf,Zsurf);
contour(Xsurf,Ysurf,Zsurf,'-k','ShowText','on')
shading interp
hold off
set(NP,'EdgeColor', 'none');
LPa=axes('position',[0.8 0.5 0.11 0.33])
hold on
LP=pcolor(Xsurf2,Ysurf2,Zsurf2)
LPc=contour(Xsurf2,Ysurf2,Zsurf2,[5,10,20,40],'-k','ShowText','on')
set(gca,'box','on')
shading interp
hold off
set(LP,'EdgeColor', 'none');

답변 (0개)

카테고리

Help CenterFile Exchange에서 Contour Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by