开发者

two trisurf plots on the same graph with different colors

开发者 https://www.devze.com 2023-02-02 18:38 出处:网络
I have two trisurfs on the same graph. I would like to have one red and one blue, but I can\'t seem to get the two plots to have different colo开发者_如何学编程rs using colormap. How can I do this?fig

I have two trisurfs on the same graph. I would like to have one red and one blue, but I can't seem to get the two plots to have different colo开发者_如何学编程rs using colormap. How can I do this?


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
0

精彩评论

暂无评论...
验证码 换一张
取 消