How to write name inside polygon?
8 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
ZeKkEn NoName
il 20 Gen 2021
Commentato: Star Strider
il 21 Gen 2021
After create a polygon how to write name inside it so you can differeniate between it and the other polygons?
0 Commenti
Risposta accettata
Star Strider
il 20 Gen 2021
Try this:
pgon = polyshape([1 3 5 7],[2 6 4 1]);
[xc,yc] = centroid(pgon);
figure
plot(pgon)
axis('equal')
text(xc,yc, sprintf('Polygon with centroid (%.2f, %.2f)', xc, yc), 'HorizontalAlignment','center', 'VerticalAlignment','middle')
producing:
.
2 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Elementary Polygons in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!