[NTG-context] metapsot vs. graphviz
adityam at umich.edu
Thu Apr 24 16:45:12 CEST 2008
On Thu, 24 Apr 2008, Gour wrote:
> While writing some written assignments I have a need to draw some simple
> Tried with Dia, but it's not superb. That's why I'm thinking about
> learning some graphic programming language...
> Anyone familiar with metapost & graphviz can write few words how the two
Metapost is for drawing all kinds of graphics. It give you a very fine
control on where to place objects, and is very well integrated with
ConTeXt (your labels will be the same font as the rest of the document).
With the new mplib, using metapost in ConTeXt is very fast (for me I do
not notice any difference; with mkii it used to take aboud 3-4 sec).
Graphviz is good for automatic positioning of nodes. If you have a large
number of nodes, it can figure out the best way to place them. There are
different versions, dot (for directed graphs), circo (for circular
graphs), neato (for undirected graphs), fps (uses a different model for
undirected graphs). For most of the cases, the output is average: the node
placement is very good, but then it is difficult to get tex to process the
labels, it is limited in terms of color effects that you can get. I find
it very hard to modify the output.
Graphiz does give metapost output, but I found it to be a bit akward to
use. The good part about graphiz is that is very easy to learn, and for
most cases the output is acceptable.
> Any other suggestion?
There is dot2tex, which a python script that converts from dot (graphviz)
to tikz. I have not tried it, but from the examples it appears to remove
all the drawbacks of integrated graphviz with tex. It is tailored towards
integration with latex, but it should not be too hard to configure it for
More information about the ntg-context