Message Boards Message Boards

0
|
3150 Views
|
3 Replies
|
1 Total Likes
View groups...
Share
Share this post:

Label vertices in a Graphics plot?

Posted 4 years ago

I have a rectangle and a rotated rectangle and I want to label their points as A, B, C, D going counterclockwise starting in the lower left corner.

Graphics[{PE,RotPE},Axes->True,AxesOrigin->{0,0,},AxesLabel->{X1,X2}]

enter image description here

POSTED BY: Nicole Visser
3 Replies

Or maybe something like this...

poly = {
   10, 5,
   15, 20,
   5, 10,
   0, 0
   } // Partition[#, 2] &

i = 0;

Graphics[
 {
  FaceForm[None]
  , EdgeForm[{GrayLevel[0.7], Thickness[Large]}]
  , poly // Polygon
  , PointSize[Large]
  , Black
  , Point[poly]
  , Map[Style[Text[++i, #, {-2, -1}], Red, Large, Bold] &, poly]
  }
 , Frame -> True
 ]
POSTED BY: Ian Williams

I’m not at my computer right now, but take a look at the documentation for BoundaryMeshRegion, HighlightMesh and Labeled. You might have to dig around in those doc pages, but I think they might give you some ideas. Hope this helps, Ian

POSTED BY: Ian Williams
Anonymous User
Anonymous User
Posted 4 years ago

What kind of label?

{PE, RotPE, Text[ "left edge", {x,y}] }

Certainly you can ample find examples in Help of various ways to label. :)

POSTED BY: Anonymous User
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract