How can I change background color in Bode plots?

10 visualizaciones (últimos 30 días)
Francesco Lasco
Francesco Lasco el 2 de Abr. de 2021
Comentada: Star Strider el 2 de Abr. de 2021
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?

Respuesta aceptada

Star Strider
Star Strider el 2 de Abr. de 2021
Try this:
figure
bode(tf([1],[1 1]));
Fg = gcf;
set(Fg.Children(2), 'Color','y')
set(Fg.Children(3), 'Color','y')
.
  3 comentarios
Francesco Lasco
Francesco Lasco el 2 de Abr. de 2021
Thank you! That was really difficult to find in the docs.
Star Strider
Star Strider el 2 de Abr. de 2021
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.

Iniciar sesión para comentar.

Más respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by