5

I want to make this

\documentclass{article}
\usepackage{tikz}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{mathrsfs}
\usepackage{textcomp}
\usetikzlibrary{arrows,snakes,automata,backgrounds,calc, positioning,quotes}
\usetikzlibrary{decorations.pathmorphing}
\pagenumbering{gobble}
\begin{document}
\centering 

\vfill

%\begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=3cm,thick,main node/.style={circle,fill=#1!0,draw,font=\sffamily\Large\bfseries}]

\begin{tikzpicture}[
        ->,    > = stealth',
       shorten > = 1pt,auto,
   node distance = 3cm,
      decoration = {snake,   % <-- added
                    pre length=3pt,post length=7pt,% <-- for better looking of arrow,
                    },
main node/.style = {circle,draw,fill=#1!0,
                    font=\sffamily\Large\bfseries},
                    ]

\node[main node=black] (0) {$\omega$};
\node[main node=black] (1)[above of=0] {$\alpha$};
\node[main node=black] (2) [above of=1]{$\alpha_0$};
\node[main node=black](3)[above of=2]{$\alpha_1$};
\node[main node=black] (4) [above of=3]{$\beta$};
\node[main node=black](5)[right of=4]{$\beta_0$};
\node[](6)[above of =3]{};
\node[main node=black](7)[left of=4]{$\beta_1$};
\node[main node=black](8)[right of =1]{$\beta_1^{'}$};
\node[](9)[left of=8]{};
\node[main node=black](10)[right of=8]{$\beta_1^{''}$};
\node[](11)[right of=10]{};

  \path[every node/.style={font=\sffamily\small}]

    (0) edge[very thick, color=blue] node [] {} (1)
    (1) edge[very thick, color=magenta]node[right]{CHILD$_{oot}$}(2)
    (2) edge[draw=gray, very thick, decorate] node [right] {SEALED} (3)
    (3) edge[very thick, color=cyan] node [right] {ADULT$_{oot}$} (4)
    (4) edge[very thick, color=red]node[above]{DEFEAT}(5)
    (4) edge[very thick, color=green]node[above]{SUCCESS}(7)
    (10) edge[very thick, color=cyan]node[]{ADULT}(11)
    (1) edge[very thick, color=magenta]node[]{CHILD}(8)
    (8) edge[draw=gray, very thick, decorate]node[]{SEALED?}(10)
    (7) edge[bend right, very thick, draw=gray]node[left]{BACK IN TIME}(1)

   ;

\end{tikzpicture}
\end{document}

look like this

enter image description here

I've never made arrows bend around a circle like this before. Any ideas?

  • 1
    Please edit your question to include the code you've got here. Your question should be self-contained so that it remains useful even if the content of your OverLeaf document disappears or changes. Also, as it stands, people may have no legal right to post an answer based on your code, depending on jurisdiction. In many cases, all-rights-reserved is the default. – cfr Jan 9 '17 at 4:26
  • 1
    \draw (<wherever>) [out=<angle>, in=<angle>] to (<wherever>); Or use arc or use .. controls () and () ... or use [bend right] or .... – cfr Jan 9 '17 at 4:32
6

I am not sure of the exact setup you want for your nodes, as it does not seem possible to fit the topology of your tikz graph to that you drew by hand.

enter image description here

This solution is rather naive.

\documentclass[tikz, border =3pt]{standalone}
\usetikzlibrary{arrows,snakes}
\begin{document}

\begin{tikzpicture}
  [
            ->,    > = stealth',
           shorten > = 1pt,auto,
       node distance = 4cm,
          decoration = {snake,   % <-- added
                        pre length=3pt,post length=7pt,% <-- for better looking of arrow,
                        },
    main node/.style = {circle,draw,fill=#1!0,
                        font=\sffamily\Large\bfseries},
  ]
  \def\r{3.5}

  \node[main node=black] (2) at (0:\r) {$\alpha_0$};
  \node[main node=black] (3) at (90:\r) {$\alpha_1$};
  \node[main node=black] (4) at (180:\r) {$\beta$};
  \node[main node=black] (7) at (-90:\r) {$\beta_1$};
  \node[main node=black] (1) at (2|-7) {$\alpha$};
  \node[main node=black] (5) [left of=4] {$\beta_0$};
  \coordinate                (6) [above of=3] {};
  \node[main node=black] (0) [below of=1] {$\omega$};
  \node[main node=black] (8) [right of=1] {$\beta_1^{'}$};
  \coordinate                (9) [left of=8]  {};
  \node[main node=black] (10)[right of=8] {$\beta_1^{''}$};
  \node[]                (11)[right of=10]{};

  \path[every node/.style={font=\sffamily\small}]

    (0) edge[very thick, color=blue] node [] {} (1)
    (1) edge[very thick, color=magenta]node[right]{CHILD$_{oot}$}(2)
    (2) edge[draw=gray, very thick, decorate, in=0, out=90] node [anchor=south west] {SEALED} (3)
    (3) edge[very thick, color=cyan, in=90, out=180] node [anchor=south east] {ADULT$_{oot}$} (4)
    (4) edge[very thick, color=red]node[above]{DEFEAT}(5)
    (4) edge[very thick, color=green, in=180, out=-90]node[anchor=north east]{SUCCESS}(7)
    (10) edge[very thick, color=cyan]node[]{ADULT}(11)
    (1) edge[very thick, color=magenta]node[]{CHILD}(8)
    (8) edge[draw=gray, very thick, decorate]node[]{SEALED?}(10)
    (7) edge[very thick, draw=gray]node[anchor = north]{BACK IN TIME}(1)

   ;

\end{tikzpicture}
\end{document}

Cheers,

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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