How can I change background color in Bode plots?

조회 수: 7 (최근 30일)
Francesco Lasco
Francesco Lasco 2021년 4월 2일
댓글: Star Strider 2021년 4월 2일
I tried the following code:
bode(tf([1],[1 1]))
set(gca, 'color','yellow')
The background color is applied to the second subplot only (phase plot).
output plot
How can I apply the effect to both of them?

채택된 답변

Star Strider
Star Strider 2021년 4월 2일
Try this:
figure
bode(tf([1],[1 1]));
Fg = gcf;
set(Fg.Children(2), 'Color','y')
set(Fg.Children(3), 'Color','y')
.
  댓글 수: 3
Francesco Lasco
Francesco Lasco 2021년 4월 2일
Thank you! That was really difficult to find in the docs.
Star Strider
Star Strider 2021년 4월 2일
As always, my pleasure!
It is generally not straightforward with the Control System figures, so changing them can be a challenge. I needed to do a bit of exploring to find that this was an option, and then exp[eriment to determine how to do it.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Frequency-Domain Analysis에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by