Is it possible to plot surface plots together with a filled contour plot?
12 次查看(过去 30 天)
显示 更早的评论
I am trying to plot surface objects along with filled contour plots in the same figure. The SURFC function allows me to create a surface plot with an unfilled contour plot at the base of the XY plane.
采纳的回答
MathWorks Support Team
2011-8-10
There is no built-in functionality to plot a surface together with a filled contour plot. You can use the HOLD ON command to simultaneously plot a surface (using the SURF function) and a filled contour (using the CONTOURF function). Then you can get handles to the patch object comprising of the filled contour plot, and change their ‘ZData’ property to shift them to the bottom of the plot.
For example, see the attached file “surfcf.m”. To execute this function, refer to the following example:
>> [X,Y,Z] = peaks(30);
>> surfcf(X,Y,Z);
This will simultaneously plot the surface and filled contour on the same figure.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Contour Plots 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!