AnThe same example given in xy-pic done in Tikz: More examples and code are at http://www.texample.net/tikz/examples/ and the manual http://mirror.ctan.org/graphics/pgf/base/doc/generic/pgf/pgfmanual.pdf
\documentclass[a4paper]{article}
\usepackage{tikz}
\usetikzlibrary{shapes}
\begin{document}
\begin{tikzpicture}
\node [name=oct,regular polygon,regular polygon sides=8,minimum size= 10em] {text};
\node at (oct.corner 1) [name=octCorner1] {$x_1$};
\node at (oct.corner 2) [name=octCorner2] {$x_2$};
\node at (oct.corner 3) [name=octCorner3] {$x_3$};
\node at (oct.corner 4) [name=octCorner4] {$x_4$};
\node at (oct.corner 5) [name=octCorner5] {$x_5$};
\node at (oct.corner 6) [name=octCorner6] {$x_6$};
\node at (oct.corner 7) [name=octCorner7] {$x_7$};
\node at (oct.corner 8) [name=octCorner8] {$x_8$};
\draw [double,-stealth,shorten <=5pt,shorten >=5pt] (oct.corner 1) -- node[above right]{$g(x)$} (oct.corner 8);
\draw [stealth-stealth,shorten <=5pt,shorten >=5pt] (oct.corner 3) -- (oct.corner 4);
\draw [-stealth,shorten <=5pt,shorten >=5pt] (oct.corner 5) --node[above]{$f(x)$} (oct.corner 6);
\end{tikzpicture}
\end{document}\begin{document}
\begin{tikzpicture}[shorten <=7pt,shorten >=7pt]
\node [name=oct,regular polygon,regular polygon sides=4,minimum size= 12em] {};
\node at (oct.corner 1) [name=octCorner1] {$Z$};
\node at (oct.corner 2) [name=octCorner2] {$X'$};
\node at (oct.corner 3) [name=octCorner3] {$Z'$};
\node at (oct.corner 4) [name=octCorner4] {$X$};
\node at (oct.center) [name=octCenter] {$Y$};
\draw [-stealth] (oct.corner 2) -- node [right] {$[1]$} (oct.corner 3);
\draw [-stealth] (oct.corner 1) -- (oct.corner 2);
\draw [-stealth] (oct.corner 1) -- (oct.corner 4);
\draw [-stealth] (oct.corner 3) -- node [above] {$[1]$} (oct.corner 4);
\draw [-stealth] (oct.corner 2) -- node [right] {$[1]$} (oct.center);
\draw [-stealth] (oct.corner 4) -- (oct.center);
\draw [-stealth] (oct.center) -- (oct.corner 3);
\draw [-stealth] (oct.center) -- (oct.corner 1);
\end{tikzpicture}
\end{document}
Changed from an octagon.