I am trying to draw just the nodes (no sides) at the vertices of a regular hexagon. This answer should be easily modified to accomplish what I want, but I am such a novice that I have difficulty understanding the example. Ideally, each vertex would be a separate named node so that I can easily draw edges between them (I will be making several different graphs using these same nodes).

7 Answers 7


You can use the regular polygon shape from the shapes.geometric library, setting draw=none. Giving the node the name a, the vertices will be named a.corner 1, a.corner 2 etc.


% create the node
\node[draw=none,minimum size=2cm,regular polygon,regular polygon sides=6] (a) {};

% draw a black dot in each vertex
\foreach \x in {1,2,...,6}
  \fill (a.corner \x) circle[radius=2pt];


Time to call \foreach. Of course, it is possible to use a lot of other tools.


\foreach \a in {0,60,...,300} { %\a is the angle variable
\draw[fill] (\a:2cm) circle (1pt); % 2cm is the radius; 1pt is the radius of the small bullet

enter image description here

Here are some other possible options, if you want to change colors.

\draw[line width=.7pt,blue,fill=yellow] (\a:1.5cm) circle (2pt);

enter image description here

  • I like the simplicity of your code, but is there a way to modify it so that I have names for each of the created nodes? Jan 2, 2014 at 22:31

Here is a PSTricks solution (with some extra features -- just remove the code not needed or outcomment it):


%  locale = DE,
  round-mode = places,
  round-precision = 2

% calculations

\psset{dimen = m}


% constants

  % centre
  % regular polygon with dots at corners
      PolyNbSides = \sides,
      unit = \radius
 {\psset{linestyle = dashed}
  % inscribed circle
  % circumscribed circle
  % dots with labels at the corners and lines from the centre to the corners
  \multido{\r = 0+\Angle, \i = 1+1}{\sides}{
      angle = \r,
      linestyle = dotted
      linecolor = red
  % dot at centre
    linecolor = blue!60
  % label position
    linestyle = none,
    offset = 9pt
  % label
  \ncput{$r = \num[round-mode = off]{\radius}$}


Regular $\sides$-gon with side length~$s = \num{\sidelength}$.



  • 1
    – user2478
    Jan 3, 2014 at 12:22
  • Arrrh, yes. Thank you. I'll edit my answer accordingly. Jan 3, 2014 at 12:24
  • 1
    you can also do \degrees[\sides] and then simply \multido{\iA=0+1}{\sides}{...}
    – user2478
    Jan 3, 2014 at 12:35

Since someone added an tag, I'll go ahead and give an Asymptote solution. Note that the programming abilities of Asymptote have the following advantages:

  1. You can store all the points in an array, which makes it easy to reference them.
  2. It is easy and natural to create points for future reference without drawing them, if so desired.

The solution (with comments):

size(3cm,0);    // scale the final picture to be 3cm wide
pair[] vertices;    // an empty array of points
int n = 11;    // number of sides
real r = 1.0;    // radius of the circle in which the polygon is inscribed
// Add the vertices to the array:
for (real angle = 0; angle < 360; angle += 360/n) {
    // The `push` command adds its argument to the end of the array.
    vertices.push(r*dir(angle));  // r*dir(angle) gives the point with polar coordinates (r, angle).
// Draw the vertices:
for (pair vertex : vertices)

// Draw a couple lines in respective colors:
draw(vertices[0] -- vertices[6], red);
draw(vertices[1] -- vertices[9], blue);

The result:

enter image description here

  • Feel free to always add Asymptote solution to any questions related to plotting, drawing, diagramming, etc because it is allowed by law in this site. Jan 5, 2014 at 21:33

A recommended solution with PSTricks. Note that n-side polygon needs n+1 for the plotpoints.

    \curvepnodes[plotpoints=13]{0}{360}{2 t PtoC}{A}

enter image description here


\curvepnodes (implemented in pst-node) needs plotpoints (implemented in pst-plot). It seems to be a bit weird as IMHO, pst-node implementing \curvepnodes should load pst-plot internally to make plotpoints available.


    \curvepnodes[plotpoints=13]{0}{360}{2 t PtoC}{A}
    \multido{\i=0+1}{\Anodecount}{\uput[!N-A\i.y N-A\i.x atan](A\i){$A_{\i}$}}

enter image description here


For labels, you could try something like this based on the answer from Torbjørn T.:

    \foreach \a/\text in {0/A,60/B,120/C,180/D,240/E,300/F} 
    \draw[fill] (\a:2cm) circle (1pt) node[right] () {\text};

which produces this

enter image description here


I use tkz-euclide with code

\tikzset{hidden/.style = {thick, dashed}}
\tkzDefPointsBy[rotation=center O angle 360/6](A,B,C,D,E){B,C,D,E,F}
\tkzDrawPoints[fill =black,size=10,color=black](A,B,C,D,E,F)
\tkzDrawPolygon[ultra thick](A,B,C,D,E,F)

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .