查看单个帖子
旧 2019-12-14, 20:38   #1
poster
高级会员
 
注册日期: 2019-11-21
帖子: 3,006
声望力: 66
poster 正向着好的方向发展
帖子 同一张图上的两个trisurf图具有不同的颜色

我在同一张图上有两个trisurf 。我想有一个红色和一个蓝色,但是我似乎无法使用colormap来使两个图具有不同的颜色。我怎样才能做到这一点?



回答:

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

更多&回答...
poster 当前离线   回复时引用此帖