contour - Matlab - surf and contour3, clipping order? -
i plotting data surface in matlab. have 3 data matrices, x,y,z. values of z may not outside range 0~1.
i generate plots following:
surf(x,y,z); [c,h] = contour3(x,y,z,'levellist',[0 : 0.1 : 1],'color','k'); clabel(c,h,[0 : 0.1 : 1]); i modifications surface, such setting shading interp.
as can see, result image clips contours underlying surface. how can ensure contour , labels plotted above surface?
after digging in doc, have found best solution.
the clipping order specified @ axes level.
a complete mwe have contours on top of surface below:
fig = figure; ax = get(gca); ax.sortmethod = 'childorder'; % important line surf(x,y,z); [c,h] = contour3(x,y,z,'levellist',[0 : 0.1 : 1],'color','k'); clabel(c,h,[0 : 0.1 : 1]); 
Comments
Post a Comment