drawing a regular hexagon
\documentclass[border=1mm]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\newdimen\R
\R=2.7cm
\draw (0:\R) \foreach \x in {60,120,...,360} { -- (\x:\R) };
\foreach \x/\l/\p in
{ 60/{(2,3,1)}/above,
120/{(2,1,3)}/above,
180/{(1,2,3)}/left,
240/{(1,3,2)}/below,
300/{(3,1,2)}/below,
360/{(3,2,1)}/right
}
\node[inner sep=1pt,circle,draw,fill,label={\p:\l}] at (\x:\R) {};
\end{tikzpicture}
\end{document}
Edit: As additionally requested, now with arrows in the middle of the sides, a circular arrow in the middle, and all sorts of labels. The arrows in the middle require the tikz library decorations.markings
. The library arrows
has been just loaded to get a fancier arrow head; without this library, replace stealth'
by >
(two times), doesn't look bad either. Moreover, I chose the option thick
to add more weight to the lines
\documentclass[border=1mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{decorations.markings,arrows}
\begin{document}
\begin{tikzpicture}
[thick
,decoration =
{markings
,mark=at position 0.5 with {\arrow{stealth'}}
}
]
\newdimen\R
\R=2.7cm
\node {X};
\draw[-stealth'] (-150:{0.7*\R}) arc (-150:150:{0.7*\R});
\foreach \x/\l in
{ 60/a,
120/b,
180/c,
240/d,
300/e,
360/f
}
\draw[postaction={decorate}] ({\x-60}:\R) -- node[auto,swap]{\l} (\x:\R);
\foreach \x/\l/\p in
{ 60/{(2,3,1)}/above,
120/{(2,1,3)}/above,
180/{(1,2,3)}/left,
240/{(1,3,2)}/below,
300/{(3,1,2)}/below,
360/{(3,2,1)}/right
}
\node[inner sep=2pt,circle,draw,fill,label={\p:\l}] at (\x:\R) {};
\end{tikzpicture}
\end{document}
The following example implements the hexagon as node with shape of a regular polygon.
\documentclass[10pt]{article}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric}
\begin{document}
\tikz\path
node[
regular polygon,
regular polygon sides=6,
draw,
inner sep=1.7cm,
] (hexagon) {}
%
% Annotations
(hexagon.corner 1) node[above] {$(2,3,1)$}
(hexagon.corner 2) node[above] {$(2,1,3)$}
(hexagon.corner 3) node[left] {$(1,2,3)$}
(hexagon.corner 4) node[below] {$(1,3,2)$}
(hexagon.corner 5) node[below] {$(3,1,2)$}
(hexagon.corner 6) node[right] {$(3,2,1)$}
%
% Small filled black circles
plot[
mark=*,
samples at={1, ..., 6},
] (hexagon.corner \x)
;
\end{document}
Is this helping you:
\documentclass[10pt]{article}
\usepackage{tikz}
\newlength{\R}\setlength{\R}{2.7cm}
\begin{document}
\begin{tikzpicture}
%% Try to define a style, to prevent typing
[inner sep=2mm,
minicirc/.style={circle,draw=black!20,fill=black!20,thick}]
%% Now do the circle with nodes
\node (circ1) at ( 60:\R) [minicirc] {(2,3,1)};
\node (circ2) at (120:\R) [minicirc] {(2,3,1)};
\node (circ3) at (180:\R) [minicirc] {(2,3,1)};
\node (circ4) at (240:\R) [minicirc] {(2,3,1)};
\node (circ5) at (300:\R) [minicirc] {(2,3,1)};
\node (circ6) at (360:\R) [minicirc] {(2,3,1)};
%% Connect those circs
\draw [thick] (circ1) to (circ2) to (circ3)
to (circ4) to (circ5) to (circ6) to (circ1);
\end{tikzpicture}
\end{document}
(This was my first attempt on TikZ :-) Thank you)
This is the result:
I've tried this first with your loop. But it seems, as if the names of the elements ("circ1", ...) are local to the loop and hence can't be addressed from outside the loop. So I did it manually without loop.
If the color of the circles doesn't suit you, you can easily change its definition in the style. Maybe you'll have to set the color of the text to be white ...