Move a contour plot down to a specific z value?
68 visualizzazioni (ultimi 30 giorni)
I want to move a contour plot down to a z=-4 value.
I have tried csurf, however that does not work, because it puts it all the way on the bottom, and it is not correctly in line with my surface for some reason.
Any help you can give would be appreciated.
[x,y] = meshgrid(-4:.05:4);
z = 3*(1-x).^2.*exp(-(x.^2) - (y+1).^2)- 10*(x/5 - x.^3 - y.^5).*exp(-x.^2-y.^2)- 1/3*exp(-(x+1).^2 - y.^2);
contour(x,y,z,30) %%%%<< I want to move this to Z=-4 and it is on Z=0 now >>%%%
Walter Roberson il 12 Mag 2013
Instead of supplying a scalar of the number of contours you want, you can provide a vector of the values at which you want the contour lines to be drawn.