Slice through a surface plot to create a contour plot
3 次查看(过去 30 天)
显示 更早的评论
This is my previous question.
I have the same 3D surface plot, and now I need to create a 2D coutour plot at z = 0.
Is there a way to do that? Thanks.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/274792/image.png)
Now i have something like this by putting
contour(xMat,yMat,delta_r2)
right after
surfl(xMat,yMat,delta_r2,'light')
but when this is just notmal "surf" instead of "surfl" it doesn't work and I need a 2D contour plot, not a slice in a 3D plot.
2 个评论
Mohammad Sami
2020-3-3
I think if you have a function call to surf, you can just replace it with function call to contour and you will get your contour plot.
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Surface and Mesh Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!