Filling area between more curves

12 ビュー (過去 30 日間)
Anezka Koterova
Anezka Koterova 2019 年 9 月 15 日
コメント済み: Anezka Koterova 2019 年 9 月 17 日
I am trying to colour the area between more curves (given also in implicite form) with one unbounded and transparent colour. This is example, how it should looks like (except from the red vertical line y=2):
And I have a same problem with planes. Is there any function to fill this "multiarea" or area between more surfaces?
I can only use fill, but it does not create comprehensive and transparent area between more curves.
Thank you.

採用された回答

Bruno Luong
Bruno Luong 2019 年 9 月 15 日
Change accordingly to suit your need.
tt = linspace(0,2*pi,361);
xy = [2*cos(tt);
4*sin(tt)];
close all
hold on
plot(xy(1,:), xy(2,:), 'k');
plot([-4 4],[0 0], 'k');
plot([-4 0],[-4 4], 'k');
plot([1 1],[-4 4], 'r');
b = [0; 1]'*xy >= 0 &...
[2; -1]'*xy >= [2; -1]'*[-2;0] ;
xyfill = [[-2;0] xy(:,b) [0; 4]];
patch('xdata',xyfill(1,:),'ydata',xyfill(2,:),'facecolor','b','facealpha',0.2, 'linewidth', 2);
axis equal
fill.png
  11 件のコメント
Bruno Luong
Bruno Luong 2019 年 9 月 16 日
Possibly, here is a simple example
Anezka Koterova
Anezka Koterova 2019 年 9 月 17 日
Thank You. I will explore that.

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

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by