Graphviz is open source graph visualization software. Graph visualization is a way of representing structural information as diagrams of abstract graphs and networks. It has important applications in networking, bioinformatics, software engineering, database and web design, machine learning, and in visual interfaces for other technical domains. From the Graphviz web site at
https://www.graphviz.org/.
Note that one installs "
Graphviz" but the command to use it (and check the installed version) is
dot.
The default file extension of a Graphviz file is
dot.
Graphviz should already be installed on CentOS but the command is
dot.
The following Linux command(s) install graphviz and dot.
sudo yum -y install graphviz
The following Linux command(s) display the installed version of dot.
dot -V
On
2019-08-14 the output was as follows.
dot - graphviz version 2.30.1 (20180420.1509)
Here is the command to run graphviz and create a png file using the above file. The input file is
hello.dot.
dot -Tpng -ohello.png hello.dot
The output file is
hello.png.
The following command can be used to set the
DPI (Dots Per Inch) of the image.
dot -Tpng -Gdip-300 -ohello.png hello.dot
Note: The following line could be added to the graph code, but it is often better (for automation) to set it from the command line.
graph [ dip = 300 ] ;
There are many other settings that can be used.