How to Set Plot Background Color

24 visualizaciones (últimos 30 días)
Yamina chbak
Yamina chbak el 30 de Jul. de 2021
Comentada: Yamina chbak el 30 de Jul. de 2021
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.

Respuesta aceptada

Yongjian Feng
Yongjian Feng el 30 de Jul. de 2021
Instead of
plot(x, y)
try
area(x, y)
  3 comentarios
Yongjian Feng
Yongjian Feng el 30 de Jul. de 2021
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 el 30 de Jul. de 2021
Thanks youuu @Yongjian Feng you explain me very well ! it's exactly what i want. thanks you again.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.

Productos


Versión

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by