Generate Homebrew dependencies graph
Tap dependent package
brew tap martido/homebrew-graph
Generate dot file
brew graph -f dot --installed --highlight-leaves -o graph.dot
Clean dot file and generate gif
cat graph.dot | sfdp -x -Goverlap=scale -Nshape=circle -Gspinles=curved -Tgif > deps.gif
The output will be in deps.gif