Add contour to 3d surface plot
显示 更早的评论
I have a 3d surface plot created using surf(x,y,z,c) and I would like to highlight a certain area by either drawing a contour line where each x,y,z triple exceeds a level, or by using a differnet colour in this an (or both)!
The help on contourslice is a bit obscure for me
Thanks
回答(1 个)
Wayne King
2011-10-6
Do you want a contour, or a patch()?
[X,Y,Z] = peaks;
surf(X,Y,Z); hold on;
patch(X,Y,4*ones(size(Z)),'green');
view(-20,4);
4 个评论
Wayne King
2011-10-6
sorry pasted incorrectly at first.
Julie
2011-10-7
Sean de Wolski
2011-10-7
30x30 is 2d...
30x30x30 would be 3d.
Sean de Wolski
2011-10-7
You visualize a dimension for each component. x/y can be 1d vectors and you visualize them on a 2d x/y plot. x/y/z are 2d matrices and so you visualize them on a 3d plot.
类别
在 帮助中心 和 File Exchange 中查找有关 Contour Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!