Surf plot with a mask
11 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Mara Meggiorin
am 20 Sep. 2019
Beantwortet: darova
am 20 Sep. 2019
Hi,
I'd like to plot an elevation map with surf, and it work quite well.
Howevr I'd like to color the surface not basing on Z bat basing on another matrix I have that is a logical mask.
I do not want to make transparent or not, I want two different colors basing on the mask.
How can I do?
Thanks
0 Kommentare
Akzeptierte Antwort
darova
am 20 Sep. 2019
Use CData property:
[X,Y] = meshgrid(-5:5);
Z = -X.^2-Y.^2;
C = rand(size(Z));
surf(X,Y,Z,'Cdata',C)
0 Kommentare
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!