how do i fill rectangle with color?
19 views (last 30 days)
Show older comments
rectangle('Position',[0 0 2 4],'Curvature',0.2)
how do i color this rectangle into red? somebody please help me
0 Comments
Answers (1)
Star Strider
on 7 Dec 2021
This is how —
figure
rectangle('Position',[0 0 2 4],'Curvature',0.2, 'FaceColor','r')
.
2 Comments
Star Strider
on 7 Dec 2021
figure
rectangle('Position',[0 0 2 4],'Curvature',0.2, 'FaceColor','r') % Original
axis('equal')
figure
rectangle('Position',[0 0 2 4],'Curvature',0.2, 'FaceColor','r') % Original
rectangle('Position',[3 2 2 1],'Curvature',0.2, 'FaceColor','g') % Additional
axis('equal')
These work.
.
See Also
Categories
Find more on Visual Exploration 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!