I cannot modify the 'FaceAlpha' property of my 'Rectangle' object
19 views (last 30 days)
Show older comments
MathWorks Support Team
on 19 Jul 2018
Answered: MathWorks Support Team
on 9 Aug 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.
Accepted Answer
MathWorks Support Team
on 19 Jul 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 Comments
More Answers (0)
See Also
Categories
Find more on Graphics Object Properties in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!