How to adding label for rectangle

14 visualizaciones (últimos 30 días)
ahmed noori
ahmed noori el 31 de Oct. de 2020
Comentada: ahmed noori el 1 de Nov. de 2020
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,:));

Respuestas (1)

Walter Roberson
Walter Roberson el 1 de Nov. de 2020
Editada: Walter Roberson el 1 de Nov. de 2020
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 comentario
ahmed noori
ahmed noori el 1 de Nov. de 2020
thank you so much ... text() was very fit.

Iniciar sesión para comentar.

Categorías

Más información sobre Legend en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by