can any one tell me how can i change the color of different part of a contour?like an image i attached here.I have no idea.thanks in advance
1 次查看(过去 30 天)
显示 更早的评论
can any one tell me how can i change the color of different part of a contour?like an image i attached here.I have no idea.thanks in advance
采纳的回答
Walter Roberson
2016-7-14
colortable = [0 0 0; %black
0 .8 .1; %bright-ish green-ish
.05 .5 0.05; %darker green-ish
... %etc
];
for K = 1 : number_of_segments
these_x = segment_x{K};
these_y = segment_y{K};
this_color = colortable(K,:);
plot(these_x, these_y, 'Color', this_color);
hold on
end
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Lighting, Transparency, and Shading 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!