How to set resolution when converting point files (graphviz) to images?

I tried

$ dot -Tpng rel_graph.gv > rel_graph.png 

but the resulting image is of very low quality.

+32
graphviz dot
Aug 17 '09 at 8:39
source share
4 answers

Try creating a chart using a higher resolution, and then reduce it.

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

-3
Aug 17 '09 at 9:26 a.m.
source share

Use the dpi attribute.

Example:

 graph G { graph [ dpi = 300 ]; /* The rest of your graph here. */ } 
+62
Oct 12 2018-10-10
source share

I find GraphViz to draw good graphics, but the resolution tends to be quite low, you can try outputting to SVG and then use some other image package to scale the image accordingly and then save it in a pixel based format like PNG. This may give you a better resolution, but I never tried it personally, I usually just create SVG files that I can view in a browser.

Just change the -T option to -Tsvg

 dot -Tsvg rel_graph.gv > rel_graph.svg 

The Dot Guide http://www.graphviz.org/pdf/dotguide.pdf has some information about scaling charts, but it’s not very clear how this affects resolution, you can also experiment with these settings and see if it improves.

+10
Aug 17 '09 at 9:20
source share

dot -Tpng -Gdpi = 300 foo.gv> foo110percent.png

Use the -Gdpi option.

You can find more information here .

+9
Feb 20 '17 at 13:24
source share



All Articles