# Drawing 2 oriented graphs in LaTeX

What would be the LateX code for drawing these two graphs?

• welcome to tex.se! what you try so far? where you have problems in this? see, if texample.net/tikz/examples/feature/automata-and-petri-nets can help you. – Zarko Nov 3 '17 at 7:25
• Welcome to TeX.SX! The short answer is that, yes, this is easy to do but I have to warn you that questions of the form "Please draw this for me", which show no effort on the part of OP, often don't get answered. You will get more help if you post some code showing what you have tried and give a minimal working example. A quick search on TeX.SX for drawing functions (with tikz or pstricks) will give you an idea of where to start from. – Andrew Nov 3 '17 at 9:11

You may use the following as starting example:

\documentclass[border=2pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{decorations.pathreplacing,decorations.markings}

\begin{document}
\begin{tikzpicture}[%
decoration={
markings,% switch on markings
at position .7
with
{
\arrow [line width=1pt] {<},
}
}]

\draw [postaction={decorate}]
(0,0) to [out=45, in=-45, distance= 2cm] node [right] {$x$} (0,0);
\draw [postaction={decorate}]
(0,0) to [out=45, in=-45, distance=-2cm] node [left]  {$y$} (0,0);

\end{tikzpicture}
\end{document}


• do you just adjust the in= and out= to make the second graph? – user147272 Nov 3 '17 at 17:39
• @user147272 Please show some effort and add a minimal working example (MWE) of what you have tried to your question. – CarLaTeX Nov 4 '17 at 4:06

With some modifications:

\documentclass[border=2pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{decorations.pathreplacing,decorations.markings}

\begin{document}
\begin{tikzpicture}

\draw [postaction={decorate},
decoration={markings,% switch on markings
at position .6
with
{
\arrow [line width=1pt] {<},
}
}]
(0,2) to [out=0, in=0, distance= 0.75cm] node [left] {$x$} (0,0);

\draw [postaction={decorate},
decoration={markings,% switch on markings
at position .55
with
{
\arrow [line width=1pt] {<},
}
}]
(0,2) to [out=0, in=0, distance= 1.5cm] node [right] {$y$} (0,0);

\draw [postaction={decorate},
decoration={markings,% switch on markings
at position .48
with
{
\arrow [line width=1pt] {>},
}
}]
(0,2) to [out=0, in=0, distance=-.75cm] node [right] {$x$} (0,0);

\draw [postaction={decorate},
decoration={markings,% switch on markings
(0,2) to [out=0, in=0, distance=-1.5cm] node [left] {$y$} (0,0);