How to adding label for rectangle
25 ビュー (過去 30 日間)
古いコメントを表示
hello everyone.....
i used the function below for drawing rectangle item, now i want to add number for this item ( like number (1) ),if anyone have idea
thanks :-)
rectangle('Position',[x y Element(i).W Element(i).H],'FaceColor',cl(i,:));

0 件のコメント
回答 (1 件)
Walter Roberson
2020 年 11 月 1 日
編集済み: Walter Roberson
2020 年 11 月 1 日
You could use text() or annotation() if you need the words to be near the rectangle.
You can use legend() if you want to create a legend. legend() can be used for all graphics objects, not just for plot()
参考
カテゴリ
Help Center および File Exchange で Legend についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!