Sign up ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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).

share|improve this question

6 Answers 6

up vote 10 down vote accepted

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];

share|improve this answer
If I want to draw a regular plolygons with label at vertices. How I can do? – minthao_2011 Jan 3 '14 at 5:41
@minthao_2011 Place nodes at a.corner 1 etc. See for example… – Torbjørn T. Jan 3 '14 at 10:31

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

share|improve this answer
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? – Austin Mohr Jan 2 '14 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
\newcommand*\areaI{\calc{pi*\radiusI^2}}%        not used
\newcommand*\areaC{\calc{pi*\radius^2}}%         not used
\newcommand*\areaRatio{\calc{cos(pi/\sides)^2}}% not used

\psset{dimen = middel}


% 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}$}


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



share|improve this answer
\psdot(\radius;\rA) – Herbert Jan 3 '14 at 12:22
Arrrh, yes. Thank you. I'll edit my answer accordingly. – Svend Tveskæg Jan 3 '14 at 12:24
you can also do \degrees[\sides] and then simply \multido{\iA=0+1}{\sides}{...} – Herbert Jan 3 '14 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

share|improve this answer
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. – kiss my armpit Jan 5 '14 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

share|improve this answer

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

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.