How to Set Plot Background Color
27 ビュー (過去 30 日間)
古いコメントを表示
Hi, I would like to set the backgrourd color of my figures, for example i have
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/699192/image.png)
and i want like that
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/699197/image.png)
it's possible ?? thanks.
0 件のコメント
採用された回答
Yongjian Feng
2021 年 7 月 30 日
Instead of
plot(x, y)
try
area(x, y)
3 件のコメント
Yongjian Feng
2021 年 7 月 30 日
Try the following combinations. Get rid the ones you don't wnat.
ar=area(x, h);
hold on
ar.EdgeColor = 'red';
ar.FaceColor = 'green';
ar2 = area(x, g);
ar2.EdgeColor = 'blue';
ar2.FaceColor = 'yellow';
plot(x, h, 'k-');
plot(x, g, 'bo-');
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!