Adpted PacVis from Arch Linux for Gentoo to visualize the portage tree
git clone https://github.com/bgloyer/pacvis.git
cd pacvis
python -m pacvis.pacvis
Then go to http://localhost:8888/ .
Pacvis is available in the GURU overlay. See https://wiki.gentoo.org/wiki/Pacvis.