I cannot modify the 'FaceAlpha' property of my 'Rectangle' object
16 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
MathWorks Support Team
le 19 Juil 2018
Réponse apportée : MathWorks Support Team
le 9 Août 2018
When I create a rectangle using:
>> a=annotation('rectangle')
I can modify its 'FaceAlpha' property. However, when I create it using:
>> b=rectangle();
then there is no 'FaceAlpha' value for me to modify even though both "a" and "b" are shown as 'Rectangle' objects.
Réponse acceptée
MathWorks Support Team
le 19 Juil 2018
While both "a" and "b" are shown as 'Rectangle' objects in the Workspace, they actually come from two different classes, and therefore have different properties:
>> a = annotation('rectangle');
>> b = rectangle;
>> class(a)
ans =
'matlab.graphics.shape.Rectangle'
>> class(b)
ans =
'matlab.graphics.primitive.Rectangle'
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!