How to add 3D points to a surfc surface plot?
36 次查看(过去 30 天)
显示 更早的评论
Hi MATLAB Central,
I have a 2D matrix called "HS" with columns (X) and rows (Y). Using the command below I can produce a beautiful 3D surface plot:
figure;
surfc(X, Y, HS);
shading interp
However, what I really want to do is to add points to the surface plot. So I want to do something like:
figure;
hold on;
surfc(X, Y, HS);
shading interp
plot3(x,y,z, 'ko');
hold off;
When I do this the 3D surface plot breaks down. Even in the absence of the plot3 command, just adding the hold on;/hold off; causes the surface plot to break down into a 2D heatmap.
Surely, there must be a way to co-plot points onto a 3D surface plot? Does anyone know how?
Thanks in advance,
Anders
0 个评论
采纳的回答
更多回答(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!