I am trying to draw the following graph in LaTeX. But I have not been able.
Asked
Active
Viewed 151 times
1
Phelype Oleinik
- 70,814
vqw7Ad
- 494
-
2Welcome to TeX.SX! It would be great if you could show us what you have tried. Posting a minimal working example that indicates what you are trying to do makes it easier for people to understand what you want. It also makes it easier for people to help you, since they have some code to start from, and hence much more likely that some one will try to help you. If you search on TeX.SX for graphs and tikz your will get a good idea of where to start. – May 01 '19 at 21:48
1 Answers
5
\documentclass[tikz,border=3.14mm]{standalone}
\usetikzlibrary{decorations.markings}
\tikzset{->-/.style={decoration={ % https://tex.stackexchange.com/a/39282/121799
markings,
mark=at position #1 with {\arrow{>}}},postaction={decorate}},
->-/.default=0.5}
\begin{document}
\begin{tikzpicture}[bullet/.style={circle,fill,inner
sep=0.3em},>=stealth,thick]
\draw[->-/.list={1/4,3/4}]
(0,0) node[bullet,label=below:$P_1$] (P1){} to[bend left] (3,0)
node[bullet,label=below:$P_2$] (P2){} to[bend left] cycle;
\draw[->-=1/4] (P1.center) to[out=30,in=30] ++ (120:1.5)
to[out=210,in=210] cycle;
\draw[->-=1/4] (P2.center) to[out=150,in=150] ++ (60:1.5)
to[out=-30,in=-30] cycle;
\end{tikzpicture}
\end{document}

