I am trying to generate the following graph
Here is the code I wrote in an attempt to generate such graph
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{arrows}
\begin{document}
\begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=3cm,
thick,main node/.style={circle,draw,font=\sffamily\Large\bfseries}]
\node[main node] (1) {a};
\node[main node] (2) [below = 1] {d};
\node[main node] (3) [right = 2] {e};
\node[main node] (4) [above left = 3] {c};
\node[main node] (5) [above right = 4] {b};
\node[main node] (6) [below right = 5] {f};
\path[every node/.style={font=\sffamily\small}]
(1) edge node [right] {a} (1)
(2) edge node [right] {d} (2)
(3) edge node [left] {e} (3)
(4) edge node [left] {c} (3)
edge node [left] {c} (2)
edge node [right] {c} (5)
(5) edge node [right] {b} (1)
(6) edge node [left] {f} (2);
\end{tikzpicture}
\end{document}
How do I get the intended graph?





positioningtikzlibrary in the preamble -- also the correct format of code isbelow=of 1– js bibra Oct 01 '21 at 14:22