latex Drawing graphs TikZ -- Manual layout


Package TikZ lends itself very well to drawing graphs.

This is a small example (requires TikZ 3.0+):



    \node[vertex] (a) {A};
    \node[vertex,right=1cm of a] (b) {B};
    \node[vertex,below right=1cm and 0.5cm of a] (c) {C};
      (a) edge node {1} (b) 
      (a) edge (c)
      (c) edge (b);

enter image description here

You can create arbitrarily complex graphs; beware lengthy code, though. Recall that there is \foreach and take note of all the positioning and styling options (cf. TikZ manual, section 13 to 17).