Filter löschen
Filter löschen

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

3 Ansichten (letzte 30 Tage)
mttxc12
mttxc12 am 15 Jan. 2016
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');

Antworten (0)

Kategorien

Mehr zu Contour Plots finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by