# 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}


The first example of your link gives

-
that is what some people like: that others do all the work ... –  Herbert Dec 17 '11 at 14:17
@Herbert I read your comment as criticism of both Altermundus and Filipe... but I would like to stress that without the answer of Altermundus, I would not have known about tkz-graph and its potential for simplifications (and I am probably not the only one). Considering that Altermundus himself is the author of tkz-graph (unless I am mistaken), I would judge that his answer is a win-win-situation for him and Filipe. –  Christian Feuersänger Dec 17 '11 at 20:41
Thanks for the help! But I'm with trouble to print in pdf, I just can print it into DVI? –  Filipe Ferminiano Dec 17 '11 at 21:28
@FilipeFerminiano Use comments, not answers, please. –  Harold Cavendish Dec 17 '11 at 21:45