Installation and use of graphviz under mac

1. Install
Graphviz http://www.graphviz.org/
MAC users recommend to install directly with homebrew, the official version is older

1. Install homebrew
open the terminal to copy and paste the following command:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

After homebrew is installed, run brew install Graphviz to

Brew: command not found
= bash: brew: command not found

terminal input sudo vim.bash_profile ,
input I to enter the input mode,
add export PATH="/usr/local/bin:$PATH",
press esc to exit the input mode,
enter :wq to exit and save
finally enter source.bash_profile to make the configuration take effect.
(note that : and Spaces are also entered, bash_profile may be saved with a warning, :w! force can be saved, more vim command reference http://www.cnblogs.com/usergaojie/p/4583796.html)

2. Use
for a random example:
1. Use the text editor (sublime in this case) to type the following:

digraph pic { 
  Hello -> World
}

3. Open the terminal and switch to the directory where the dot file is located, enter dot pic.dot-t png-o pic.png
4. You can see that a pic.png file

has been generated under the dot file directory

>
>
>
>
>
>
>
>
>
>
>
>
https://blog.zengrong.net/post/2294.html
https://zhuanlan.zhihu.com/p/22820399

Read More: