How to overlay two surf plots?
21 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
LEONG SING YEW
am 14 Mär. 2020
Kommentiert: LEONG SING YEW
am 22 Mär. 2020
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/277171/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/277172/image.png)
Hi everyone,
I am trying to overlay the contour stroke shape into the colorful surf plot
Here the code i've tried but it doesnt work, it only show the left image above
hold on
surf(X,Y,-M1); surf(-X,Y,M1); %Reflection along y axis
surf(X,Y,Ta); surf(-X,Y,Ta); %Stroke Contour
4 Kommentare
Walter Roberson
am 15 Mär. 2020
It would help if we had your data to work with -- X, Y, and M1 and Ta
Akzeptierte Antwort
Walter Roberson
am 16 Mär. 2020
view(0,-90)
4 Kommentare
Walter Roberson
am 22 Mär. 2020
plot() creates a 3D plot with empty Z components, and that in turn is treated the same as if the Z components were all 0. You can use plot3() to provide explicit Z coordinates; you would want to use a Z larger than the largest Z in the surf plot.
I wonder if pcolor() would be better than surf() for your purpose? pcolor is a surface plot underneath, but it creates a surface in which all the Z are 0 and the color data is set according to the Z data that was passed to pcolor(). Using Z all 0 can make it easier to draw things on top of it.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Lighting, Transparency, and Shading 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!