\begin{tikzpicture}[node distance=4cm, auto]
	\node[label={left:Graf $G$}] (G) {
        \begin{tikzpicture}
            \def\V{(0,0)/red,(1,-0.5)/teal,(0.5,-2)/green,(-1,-1)/blue}
            \def\E{1/2,2/3,3/4,4/1}

            \foreach \pos/\color[count=\v] in \V \node[vertex, draw=\color, very thick] (v-\v) at \pos {\v};
            \foreach \u/\v in \E \draw (v-\u) -- (v-\v);
        \end{tikzpicture}
    };
    
    \node[right of=G, anchor=west, label={left:Graf $H$}] (H) {
        \begin{tikzpicture}
            \def\V{(-1.5,1)/teal,(-.5,2)/green,(0,-.5)/red,(1,.5)/blue}
            \def\VV{(-1,-1.5),(2,-1),(-1.5,3),(2,1.5)}
            \def\E{1/2,1/3,1/4,2/3,2/4,3/4,1/5,3/5,5/6,6/8,8/2,4/8,3/6,1/7,2/7,7/8}

            \foreach \pos/\color[count=\v] in \V \node[vertex, draw=\color, very thick] (v-\v) at \pos {\v};
            \foreach \pos[count=\v from 5] in \VV \node[vertex, very thick] (v-\v) at \pos {\v};

            \foreach \u/\v in \E \draw (v-\u) -- (v-\v);
        \end{tikzpicture}
    };
\end{tikzpicture}
