How to draw overlapping clusters in Graphviz?

倖福魔咒の 提交于 2021-02-07 05:35:12

问题


I'm trying to use GraphViz to draw graphical models. However, I didn't find a way to make draw overlapping clusters. For example, how can I make "nodeA->nodeB" to lie inside both clusterA and clusterB?


回答1:


AFAIK you can't.

Clusters as described in the documentation:

If the name of the subgraph begins with cluster, Graphviz notes the subgraph as a special cluster subgraph. If supported, the layout engine will do the layout so that the nodes belonging to the cluster are drawn together, with the entire drawing of the cluster contained within a bounding rectangle.

The whole idea of clusters is not to overlap, but to group nodes (and graphviz raises an error when a node is part of two subgraphs).



来源:https://stackoverflow.com/questions/12680865/how-to-draw-overlapping-clusters-in-graphviz

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!