I have a 3d surface in my figure surf(x,y,z)
I also have a contourf
surface (which is basically a 2D plane).
I plot them in the same figure but the contourf
plot is automatically at z=0
level. I want to move the contourf
plot to z=-10
(or any value on z-axis) but I can't do it.
I am sure it is easy but I can't find the answer in MATLAB help/Google. Any ideas?
Consider the following example:
UPDATE:
The above doesn't work anymore in HG2. It can be fixed using a hidden property of contours
ContourZLevel
:You can also use
hgtransform
to achieve a similar thing, which is the documented and recommended approach.See another answer of mine for further explanation: plot multiple 2d contour plots in one 3d figure.