Fill my plot with a colour

조회 수: 20 (최근 30일)
P_L
P_L 2019년 2월 11일
댓글: Star Strider 2019년 2월 11일
Hi I have made the attached image but want to fill the plot inside with the colour: [1 0.92 0.8].
Does anyone know how to do this?
Many thanks
  댓글 수: 2
Geoff Hayes
Geoff Hayes 2019년 2월 11일
harpreet - which "plot inside with colour..."? Do you mean that you want to change the white background to [1 0.92 0.8]? If so, then you would do something like
set(gca,'Color',[1 0.92 0.8])
where gca gets the current axes.
P_L
P_L 2019년 2월 11일
Thank you!! Yes that was exactly what I wanted :)

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

채택된 답변

Star Strider
Star Strider 2019년 2월 11일
Try this:
figure
plot(rand(1,10), rand(1,10), 'p')
set(gca, 'Color',[1 0.92 0.8])
  댓글 수: 2
P_L
P_L 2019년 2월 11일
Many thanks :)
Star Strider
Star Strider 2019년 2월 11일
As always, my pleasure!

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Line Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by