I wanted to write something wherein i need all confirmations of a graph side by side and argue something. How could I do that using Latex and Tikz.

Like i want all graph configurations with 3 edges and pick the one which I wanted how can i do it? **See the Images side by side and not one below the other how could i don this using tikz**

  • 1
    and what you try so far? do you like to have two figures side by side?
    – Zarko
    Oct 25, 2016 at 17:54

1 Answer 1


Draw the graphs as tikzpictures and use the baseline option to indicate on which node the pictures should get aligned.

\tikzset{vertex/.style={circle,draw,minimum width=3mm}}
  \node[vertex] (a) at (0,0) {};
  \node[vertex] (b) at (1,0) {};
  \node[vertex] (c) at (2,0) {};
  \node[vertex] (d) at (3,0) {};
  \draw (a) -- node{1} (b)
            -- node{2} (c)
            -- node{3} (d);
  \node[vertex] (a) at (0, 0.5) {};
  \node[vertex] (b) at (0,-0.5) {};
  \node[vertex] (c) at (1, 0  ) {};
  \node[vertex] (d) at (2, 0  ) {};
  \draw (a) -- node{1} (c)
            -- node{2} (d)
        (b) -- node[swap]{3} (c);

enter image description here

  • how can label the edges in the process of making the edges.
    – Jaugust
    Oct 25, 2016 at 20:29
  • @Jaugust I have modified the answer to show how to label the edges.
    – gernot
    Oct 25, 2016 at 21:56

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.