How to add different shaded Color to the back ground of a graph?

31 ビュー (過去 30 日間)
taimour sadiq
taimour sadiq 2023 年 8 月 15 日
コメント済み: taimour sadiq 2023 年 8 月 16 日
a = 0:0.1:2*pi;
b = sin(a);
plot(a,b)
i have written a simple code of sin wave.. i want to add diffrent background colours to different regions or bands.. for example 0-2 some colour, 2-4 some other colour.. as shown in a picture added with this question.
i have tried "area" & "Fill" function but not getting desired results.

採用された回答

Image Analyst
Image Analyst 2023 年 8 月 15 日
Try fill or patch

その他の回答 (0 件)

カテゴリ

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

タグ

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by