ElkJS is a seriously awesome library for laying out plots and diagrams. Easy enough to get started, yet still has a million knobs available to tweak.

https://github.com/OpenKieler/elkjs

@williballenthin