how to write GraphViz subgraphs with boost::write_graphviz
Is it possible to generate a DOT subgraph using ::boost::write_graphviz ? For instance, if I create a subgraph G0 in a graph G, can I get something like the following in the DOT output: graph G { subgraph G0 { ... } ... } I finally figured out both how subgraphs work and how to use boost::write_graphviz to actually print these. The first requirement is "semi-documented" in a comment in the boost library source code: requires graph_name property . The most surprising requirement however seemed to be that detail::write_graphviz_subgraph assumes the presence of vertex_attribute edge_attribute