The size attribute lets you recommend a maximum or desired height and width for the output image in inches. I.e., the attribute size=3,5 tells Graphviz to generate a 3 by 5 inch image at most. If the image is smaller than 3 by 5 to begin with, Graphviz will leave it alone.
How do I use graphviz to convert this into an image? For windows: dl the msi and install; Find gvedit.exe in your programs list; Open . dot file in question; Click running person on toolbar; Go to graph -> settings ; change Output file type to file type of your liking and press ok..
How to open a DOT file. You can open DOT files with Microsoft Word in Windows and macOS. The word processor is also available for Android and iOS devices, but only the iOS version supports DOT files. Other word processors can also open DOT files but they may not fully support the formatting of the original templates.
Use the dpi attribute.
Example:
graph G {
graph [ dpi = 300 ];
/* The rest of your graph here. */
}
dot -Tpng -Gdpi=300 foo.gv > foo110percent.png
Use option -Gdpi.
You can find more information here.
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.svg
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With