tags:

views:

273

answers:

3

I tried

$ dot -Tpng rel_graph.gv > rel_graph.png

but the resulting image has a very low quality.

A: 

I find GraphViz draws nice Graphs but the resolution tends to be reasonably low, you could try outputting to SVG and then using some other image package to scale the image appropriately and then save to a pixel based format like PNG. This might give you better resolution but I've never tried it personally, I tend to mainly just create SVG files I can then view with a browser.

Just change the -T parameter to -Tsvg

dot -Tsvg rel_graph.gv > rel_graph.png

There is some stuff in the Dot Guide http://www.graphviz.org/pdf/dotguide.pdf about scaling of Graphs but it's not very clear about how that affects resolution, you could also experiment with those settings and see if that improves things.

RobV
+1  A: 

Try to generate the diagram using a higher resolution, then downsample it.

http://www.umlgraph.org/faq.html

mfx
A: 

Use the dpi attribute.

Example:

graph G { 
  graph [ dpi = 300 ]; 
  /* The rest of your graph here. */ 
}
MarcP