2

Is there a simple way to achieve this type of graph?

enter image description here

Obviously a lot neater than this... But the important feature is the join between the two children of P.

4

This solution uses the powerful forest package together with the angles library of PGF/TikZ.

A special style, tree angle is defined which marks the angle between a child node and the next sibling.

The combination allows the tree itself to be specified very concisely:

\documentclass[tikz,border=5pt]{standalone}
\usepackage{forest}
\usetikzlibrary{arrows.meta, angles}
\begin{document}
\forestset{
  tree angle/.style={
    tikz={\path () coordinate (A) -- (!u) coordinate (B) -- (!n) coordinate (C) pic [draw] {angle};}
  }
}
\begin{forest}
  for tree={
    draw,
    circle,
    edge={-{Stealth[]}},
    l sep+=7.5pt
  },
  [P
  [Q, tree angle
      [T, tree angle]
      [U]
    ]
    [R]
    [S
      [V]
      [W, tree angle]
      [X]
    ]
  ]
\end{forest}
\end{document}

tree angles in a forest

6

You should study pgfmanual (v2.10 as of mine) for trees library (sections 18.Making Trees Grow, 53.Tree Library) and placing nodes on a line or curve (sections 16.8 and 16.9).

\documentclass{minimal}
\usepackage{tikz}
\usetikzlibrary{trees}
\begin{document}
\begin{tikzpicture}[level distance=1.5cm, grow=down,
    every node/.style={draw, circle, thin},
    edge from parent/.style={-latex, thick, draw}
]
\node (P) {P}
    child {node (Q) {Q}
        child {node (T) {T}}
        child {node (U) {U}}
    }
    child {node (R) {R}}
    child {node (S) {S}};

\path (P) -- coordinate[midway] (PQ) (Q);
\path (P) -- coordinate[midway] (PR) (R);

\draw (PQ) to[bend right=22] (PR);
\end{tikzpicture}
\end{document}

Code output

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.