How to add 3D points to a surfc surface plot?
30 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponse acceptée
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Surface and Mesh Plots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!