Of course, you can use graphviz's subgraphs! Thanks, Jared Summers!

(For some reason my android vkeyboard's space bar becomes tiny here. I'm sorry, it's causing me to post my comments prematurely...)