Hi, I would like to set the backgrourd color of my figures, for example i have
and i want like that
it's possible ?? thanks.

 채택된 답변

Yongjian Feng
Yongjian Feng 2021년 7월 30일

0 개 추천

Instead of
plot(x, y)
try
area(x, y)

댓글 수: 3

Thanks @Yongjian Feng for answer me, but can you help me more because if I write for example
plot(x, h,'k-', x, g, 'bo-')
% or plot(x,h,'k-'), hold on, plot(x,g,'bo-')
what I do ? and i want to choose the backround color
Thanks again
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-');
Yamina chbak
Yamina chbak 2021년 7월 30일
Thanks youuu @Yongjian Feng you explain me very well ! it's exactly what i want. thanks you again.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

제품

릴리스

R2018b

질문:

2021년 7월 30일

댓글:

2021년 7월 30일

Community Treasure Hunt

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

Start Hunting!

Translated by