Search code examples
graphviz

how to set subgraph width in graphviz?


I am drawing a graphic using this:

digraph G {
  subgraph cluster_redisObject{
    style="rounded";
    bgcolor="#028d35";

    type [label="数据类型(Type)",style=rounded,shape=box];
    encoding [label="编码类型(Encoding)",style=rounded,shape=box]
  }
}

The object arrange herizon,

enter image description here

How to make subgraph element arrangement by verticle(up&down)?


Solution

  • You could simply add an invisible edge between those nodes, for example:

    type -> encoding [style = invis]