3

I'm trying to make a graph like this, but I have not been able to draw the curved arrow in the center.

enter image description here

Here is what I have:

\begin{figure}
\centering
\begin{tikzpicture}
%% vertices
\draw[fill=black] (0,0) circle (3pt);
\draw[fill=black] (1,0) circle (3pt);
\draw[fill=white] (2,0) circle (3pt);

\draw[fill=black] (3.3,0) circle (3pt); \draw[fill=black] (4.3,0) circle (3pt); \draw[fill=white] (5.3,0) circle (3pt);

\draw[fill=white] (6.6,0) circle (3pt); \draw[fill=white] (7.6,0) circle (3pt); \draw[fill=black] (8.6,0) circle (3pt); %% vertex labels \node at (0, .8) {1}; \node at (0, -.3) {x}; \node at (1, -.3) {y}; \node at (2, -.3) {z};

\node at (3.3, .8) {2}; \node at (3.3, -.3) {x}; \node at (4.3, -.3) {y}; \node at (5.3, -.3) {z};

\node at (6.6, .8) {3}; \node at (6.6, -.3) {x}; \node at (7.6, -.3) {y}; \node at (8.6, -.3) {z};

%%% edges \draw[thick] (0,0) -- (1,0) -- (1.9,0); \draw[thick] (3.3,0) -- (4.3,0) -- (5.2,0); \draw[thick] (6.7,0) -- (7.5,0); \draw[thick] (7.7,0) -- (8.6,0); \end{tikzpicture} \caption{Existe una jugada entre el tablero 1 y el tablero 3.} \end{figure}

Which looks like this:

enter image description here

1 Answers1

4

You can use an edge:

\draw[red, dotted, thick, shorten >=3pt, shorten <=3pt]  
    (X2) edge[out=45, in=135, -stealth] (Z2);

which yields

enter image description here

Suggestions:

  • Use \coordinates to define points with names. In the code below I defined coordinates (X2) and (Z2).
  • Place the \nodes using the named coordinates and use a \tikzset to define a style to adjust the position of the \node label relative to the coordinate. I defined the style Node Position to specify the location of the labels.

Code:

\documentclass{article}
\usepackage{tikz}

\begin{document} \begin{tikzpicture} \coordinate (X2) at (3.3, 0); \coordinate (Z2) at (5.3, 0);

\tikzset{Node Position/.style={yshift=-0.3cm}}

%% vertices \draw[fill=black] (0,0) circle (3pt); \draw[fill=black] (1,0) circle (3pt); \draw[fill=white] (2,0) circle (3pt);

\draw[fill=black] (X2) circle (3pt); \draw[fill=black] (4.3,0) circle (3pt); \draw[fill=white] (Z2) circle (3pt);

\draw[fill=white] (6.6,0) circle (3pt); \draw[fill=white] (7.6,0) circle (3pt); \draw[fill=black] (8.6,0) circle (3pt); %% vertex labels \node at (0, .8) {1}; \node at (0, -.3) {x}; \node at (1, -.3) {y}; \node at (2, -.3) {z};

\node at (3.3, .8) {2}; \node [Node Position] at (X2) {x}; \node at (4.3, -.3) {y}; \node [Node Position] at (Z2) {z};

\draw[red, dotted, thick, shorten >=3pt, shorten <=3pt] (X2) edge[out=45, in=135, -stealth] (Z2);

\node at (6.6, .8) {3}; \node at (6.6, -.3) {x}; \node at (7.6, -.3) {y}; \node at (8.6, -.3) {z};

%%% edges \draw[thick] (0,0) -- (1,0) -- (1.9,0); \draw[thick] (3.3,0) -- (4.3,0) -- (5.2,0); \draw[thick] (6.7,0) -- (7.5,0); \draw[thick] (7.7,0) -- (8.6,0); \end{tikzpicture} \end{document}

Peter Grill
  • 223,288