patch with same color as border

21 ビュー (過去 30 日間)
Mohsen
Mohsen 2019 年 9 月 2 日
コメント済み: Star Strider 2024 年 3 月 21 日
When using a "patch" command the border is black and interior is of the chosen color. How do I make both have same color, for example a circle that is blue and its border is also blue? I have tried to redraw the border separately in blue color, but then I get a few scattered speckles of black.

採用された回答

Star Strider
Star Strider 2019 年 9 月 2 日
The easiest way is to use the patch function EdgeColor property. You can color it to be the same as the patch face color, or you can turn it off with the 'none' option.
  2 件のコメント
Lawrence
Lawrence 2024 年 3 月 21 日
Hello - I am trying to plot a patch with with per-face edge color. i.e. the faces colors are individually specified, and I'd like the edge colors for each face to be inherited from the face color.
I have read through the Patch documentation but I can't figure out how to do what you're describing.
I want the edges of each face to have the same color, and I want this color to be the same as the face color they belong to. Do you have any ideas? Thanks!
Star Strider
Star Strider 2024 年 3 月 21 日
Other than specifying that the edge colour is the same as the face colour, for example
patch(xvals, yvals, 'g', 'EdgeColor','g')
I don’t.
I suggest posting this as a new question, if this does not solve your problem —
figure
patch([1 2 2 1], [1 1 2 2], 'g', 'EdgeColor','g')
axis('padded')
axis('equal')
.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAnnotations についてさらに検索

タグ

製品


リリース

R2015b

Community Treasure Hunt

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

Start Hunting!

Translated by