Setting background color for patches
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
MathWorks Support Team
le 29 Déc 2016
Réponse apportée : MathWorks Support Team
le 29 Déc 2016
I am creating a patch according to the following code :
t = 0:pi/5:2*pi;
figure
patch(sin(t),cos(t),'y')
axis equal
But the background is white. I would like the background to be blue. How do I do this?
Réponse acceptée
MathWorks Support Team
le 29 Déc 2016
To set the background color, simply change the color of the axis. This can be done as follows :
t = 0:pi/5:2*pi;
figure
patch(sin(t),cos(t),'y')
axis equal
ax = gca;
ax.Color = 'b';
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Graphics Object Properties dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!