# What package and how can draw these kind of graphs

I just have no clue how to draw these especially how to arrange the lines arbitrarily.

• With TikZ it is certainly possible, other options include asymptote and pstricks. – user121799 Jun 5 at 22:11

I would use TikZ for that because this allows you to use loops for repeating elements and relative positioning.

\documentclass[tikz,border=3.14mm]{standalone}
\usepackage{amssymb}
\begin{document}
\begin{tikzpicture}
\draw (0,1) -- (0,4) node[above]{$\mathbb{P}^1$}
(0,0) -- (4,4) node[above right]{$\tau_4$}
(2,0) -- (2,4) node[above]{$U_q$};
\foreach \Y [count=\Z starting from 0] in {0,1.5,2.5,3.5}
{\draw (1,\Y) -- (4,\Y) \ifnum\Z=0
node[right]{$M_{0,4}$}
\else
node[right]{$\tau_{\Z}$}
(0.1,\Y) -- (-0.1,\Y) node[left]{\ifnum\Z=3
$\infty$
\else
$\the\numexpr\Z-1$
\fi}
\fi;
\foreach \X in {1.5,2.5,3.5}
\end{tikzpicture}

\begin{tikzpicture}
\draw (0,0) node[below]{$\widetilde{U}_0$} -- (0,3)
(-0.5,0.5) -- (3,0.5) node[pos=1.1]{$\widetilde{\tau}_2$}
(-0.5,0.8) -- ++ (30:3) node[pos=1.1]{$\widetilde{\tau}_3$}
(-0.2,2) -- ++ (70:3.6) node[pos=1.1]{$E_0$} coordinate[pos=0.8] (aux1)
coordinate[pos=0.9] (aux2)
([xshift=-8mm]aux1) -- ++(-40:2.5) node[pos=1.1]{$\widetilde{\tau}_1$}
([xshift=-8mm]aux2) -- ++(-15:2.5) node[pos=1.1]{$\widetilde{\tau}_4$};
\end{tikzpicture}

\begin{tikzpicture}[bullet/.style={circle,fill,inner sep=1pt}]
\draw (0,0) -- (45:4) node[pos=0.2,bullet,label=above:$i$]{}
node[pos=0.4,bullet,label=above:$j$]{}
node[pos=0.6,bullet,label=above:$k$]{}
node[pos=0.8,bullet,label=above:$\ell$]{};
\end{tikzpicture}
\end{document}


• You're faster than the light. My compliments for the short time to realize the picture. – Sebastiano Jun 5 at 22:39
• @Sebastiano We had this already: slow marmots get caught by the eagles. – user121799 Jun 5 at 22:40
• @marmot Thank you. Somehow it take me longer to draw these pictures than understanding what a moduli space is... Another question how to adjust the labels of nodes a bit from the default positions? – Upc Jun 5 at 23:18
• @Upc You can use e.g. node[pos=0.4,bullet,label={[outer sep=1em]above:$j$}]{} instead of node[pos=0.4,bullet,label=above:$j$]{} or globally say \tikzset{every label/.append style={outer sep=1em}}. There are many possibilities, including yshift and so on. (I feel that it is simpler than moduli spaces. ;-) – user121799 Jun 5 at 23:34