MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   资料存档 (https://www.labfans.com/bbs/forumdisplay.php?f=72)
-   -   同一张图上的两个trisurf图具有不同的颜色 (https://www.labfans.com/bbs/showthread.php?t=26638)

poster 2019-12-14 20:38

同一张图上的两个trisurf图具有不同的颜色
 
我在同一张图上有两个[URL="http://www.mathworks.com/help/techdoc/ref/trisurf.html"]trisurf[/URL] 。我想有一个红色和一个蓝色,但是我似乎无法使用colormap来使两个图具有不同的颜色。我怎样才能做到这一点?



[B]回答:[/B]

figure [x,y]=meshgrid(1:15,1:15); tri = delaunay(x,y); z1 = peaks(15); th1 = trisurf(tri,x,y,z1); set(th1, 'FaceColor', 'b') hold all z2 = 0.4*peaks(15); th2 = trisurf(tri,x,y,z2); set(th2, 'FaceColor', 'r') hold off

[url=https://stackoverflow.com/questions/4582746]更多&回答...[/url]


所有时间均为北京时间。现在的时间是 18:09

Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.