I need to draw the following Figure:

Directed graph I already wrote the following code: In this code not generate the directions of the graph. How to do this and organizte according to Figure that I annexed?


        %% vertices
        \draw[fill=black] (0,0) circle (3pt);
        \draw[fill=black] (4,0) circle (3pt);
        \draw[fill=black] (2,-1) circle (3pt);
        \draw[fill=black] (4,2) circle (3pt);
        \draw[fill=black] (0,2) circle (3pt);
        % labelleds
        \node at (-0.5,2) {$a$};
        \node at (-0.5,0) {$b$};
        \node at (4.5,0) {$c$};
        \node at (2.5,-1.2) {$e$};
        \node at (4,2.3) {$d$};
        %% arcs
        (2,-1) -- (0,0) -- (4,2) -- (4,0);
        \draw[->] (2,-1) -- (4,0);
        \draw[->] (0,0) -- (4,0);
        \draw[->] (0,2) -- (0,0);

enter image description here

2 Answers 2


Another possibilities:

  • for nodes is defined style dot with option for label
  • used are absolute coordinate (slightly modified from OP MWE)
  • for edge is defined style, which has option postaction=decorate

       decoration = {markings,
                     mark=at position .5 with {\arrow{Stealth[length=2mm]}}},
       dot/.style = {circle, fill, inner sep=2.4pt, node contents={},
every edge/.style = {draw, postaction=decorate}
\node (a) at (0,5) [dot=$a$];
\node (b) at (1,2) [dot=below:$b$];
\node (c) at (4,2) [dot=$c$];
\node (d) at (6,4) [dot=right:$d$];
\node (e) at (3,0) [dot=right:$e$];
\path   (a) edge (b)    (b) edge (c)    
        (c) edge (d)    (c) edge (e)
        (d) edge[bend left] (c);

enter image description here


Here is a way.

enter image description here

decoration={markings,% switch on markings
mark=at position #1 with {\arrow{latex}},
(0,0) coordinate (a) node[above]{$a$}--     
++(-60:1.5) coordinate (b) node[below left]{$b$}--
++(0:2.5) coordinate (c) node[above]{$c$}--
+(30:2) coordinate (d) node[right]{$d$}--
+(-130:2) coordinate (e) node[below]{$e$}
\draw[myarrow=.5] (a)--(b);
\draw[myarrow=.5] (b)--(c);
\draw[myarrow=.5] (c)--(d);
\draw[myarrow=.5] (e)--(c);
\draw[myarrow=.5] (d) to[bend left=40] (c);

\foreach \p in {a,...,e}
\fill (\p) circle(1.5pt);

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .