I want to use graphviz in order to draw for a given graph all the maximal cliques that it has. Therefore I would like that nodes in the same maximal clique will be visually enca
I don't think you can do this. Clusters are done via subgraphs, which are expected to be separate graphs, not overlapping with other subgraphs.
You could change the visualisation though; if you imagine that the members of a clique are members of some set S
, then you could simply add a node S
and add directed or dashed edges linking each member to the S
node. If the S
nodes are given a different shape, then it should be clear which nodes are in which cliques.
If you really want, you can give the edges connecting members to their clique node high weights, which should bring them close together on the graph.
Note that there would never be edges between the clique nodes; that would indicate that two cliques are maximally connected, which just implies they are in fact one large clique, not two separate ones.