# How can I draw a DAG? [duplicate]

Possible Duplicate:
Typesetting a directed, weighted graph with TikZ

I would like to draw a DAG - Directed acyclic graph. How can I do this?

## marked as duplicate by Roelof Spijker, Werner, egreg, Joseph Wright♦Dec 18 '11 at 7:49

• Have a look at the packages TikZ and pstricks. You will find much information and examples in the web. For example: tug.org/PSTricks/main.cgi?file=examples or texample.net/tikz/examples – Marco Daniel Dec 17 '11 at 11:44
• If you decided which package you prefer, and if you then have a problem in creating the drawing, you could edit your question and show to us what you have tried, so we could help you to improve that. – Stefan Kottwitz Dec 17 '11 at 11:49
• I'd go with the TikZ package and its automata and positioning libraries.:) – Paulo Cereda Dec 17 '11 at 11:54
• For a possible solution see this question. – Thorsten Donig Dec 17 '11 at 12:01
• Also, you might consider using metapost. – mbork Dec 17 '11 at 12:18

A solution with tkz-graph based on TikZ. You can used the styles from TikZ but you need to learn another syntax (very minimal) and you can use TikZ.

An advantage is that you can use scale without difficulty.

    \documentclass{scrartcl}
\usepackage{tkz-graph}
\usetikzlibrary{shapes.geometric}%
\thispagestyle{empty}
\begin{document}

\tikzstyle{VertexStyle} = [shape            = ellipse,
minimum width    = 6ex,%
draw]

\tikzstyle{EdgeStyle}   = [->,>=stealth']

\begin{tikzpicture}[scale=1.5]
\SetGraphUnit{2}
\Vertex{11}  \NO(11){5}   \WE(11){2} \SO(11){7} \EA(11){10}
\SOEA(11){9} \SOEA(10){3}\SOEA(9){8}
\Edges(5,11,10) \Edges(3,8,9) \Edges(7,11,2)
\Edges(11,9)    \Edges(3,10)
\end{tikzpicture}
\end{document}