How to add 3D points to a surfc surface plot?
30 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Surface and Mesh Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!