How to adding label for rectangle

조회 수: 7 (최근 30일)
ahmed noori
ahmed noori 2020년 10월 31일
댓글: ahmed noori 2020년 11월 1일
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,:));

답변 (1개)

Walter Roberson
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()
  댓글 수: 1
ahmed noori
ahmed noori 2020년 11월 1일
thank you so much ... text() was very fit.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Legend에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by