what is graphviz ?
- Graphviz stands for graph visualization
- Graph visualization is a way of representing structural information as diagrams of abstract graphs and networks. Automatic graph drawing has many important applications in software engineering, database and web design, networking, and in visual interfaces for many other domains.
install by brew
- brew install graphviz
install by port
-
visit https://www.macports.org/install.php and download suitable port version for your mac os
-
https://github.com/macports/macports-base/releases/download/v2.7.2/MacPorts-2.7.2-10.14-Mojave.pkg
-
sudo port install graphviz
-
dot -V
dot - graphviz version 2.50.0 (20211204.2007)
tip
- if brew does not work , try port
- on my computer brew failed but port succed
usage
- save one file named pic.dot
echo 'digraph { a -> b->c->d->a }' >pic.dot
digraph { a -> b->c->d->a }
- dot pic.dot -T png -o pic.png
generates
image.png
网友评论