patch colours and plot colours

2 次查看(过去 30 天)
Pa342
Pa342 2019-10-1
评论: Pa342 2019-10-1
I am having an issue using :
patch
and using:
plot
Specifically when using patch:
figure(1)
patch(vert_x,vert_y,'yellow');
But when using plot on a polygon obtained using polyshape, denoted by the variable name object1:
figure(2)
plot(object1,'FaceColor','yellow');
The output is correct, but the yellow obtained from figure 2 is noticeably lighter in color than the yellow which is obtained in patch. I want the colors to look the same. How can I overcome this issue? I have tried RGB colors and this has not fixed the issue.
  1 个评论
Pa342
Pa342 2019-10-1
Okay so the solution was to use:
'FaceAlpha',1
In other words,
plot(object1,'FaceColor','yellow','FaceAlpha',1);
For some bizarre reason, the brightness of two plot methods have different settings, even when using the same colors.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Polygons 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by