I use Graphviz throughout my book
https://www.handsonscala.com to render diagrams. I honestly think it looks pretty good:
- Dependency graph between chapters in the book: https://www.handsonscala.com/chapter-1-hands-on-scala.html#s...
- Tree-shaped `Vector` with structural sharing: https://www.handsonscala.com/chapter-4-scala-collections.htm...
- Singly-linked `List` with shared tails: https://www.handsonscala.com/chapter-4-scala-collections.htm...
- Collections class inheritance hierarchy: https://www.handsonscala.com/chapter-4-scala-collections.htm...
The book's home page above also has a nice actor-message-passing diagram rendered with Graphviz (might need to scroll down a bit).
My only preferred change to the default style is `node [shape=box width=0 height=0]`. Otherwise the nodes have tons of white space that makes the graph a lot more bulky than it really needs to be.
The automated layout engine gives me exactly what I want 90% of the time, and the last 10% is usually isn't too hard to coax into looking good via `rank=same`s or `constraint=false` or similar. In particular, the examples above required zero coaxing: I just specified the graph structure, and that's the layout that popped out.
I ended up doing a lot of prototyping in http://www.webgraphviz.com/ and before pasting the final DOT into my markdown file. IntelliJ has a Graphviz/DOT plugin, but it's not as seamless as using that web editor. The graphs definitely end up looking a lot more consistent than anything I could come up with dragging boxes around in microsoft office or google docs.
The graphs don't look fancy and design-y, but they're simple and straightforward and get the point across clearly.