开发者

How does one originate multiple edges from a single Graphviz record field?

Having single edges originate from a Graphviz record field is very straightforward and easy to control via ports and compass points.

I have a need, though, to have multiple edges originate from a single record field. The syntax of the DOT language does not appear to support this. Subgraphs may work for me, but the depiction of records is r开发者_StackOverfloweally the best representation of the data records.


have multiple edges originate from a single record field

I'm not really sure why the syntax of the dot language would not allow it. For example:

digraph g{
  r[label="<f0> left|<f1> middle|<f2> right", shape=record];
  r:f0 -> {a;b;};
  r:f2 -> c;
  r:f2 -> d;
}

The fields f0 and f2 have both more than one outgoing edge.

How does one originate multiple edges from a single Graphviz record field?

By the way, though record shapes still work, it seems as if HTML-like labels are replacing them. From the graphivz web site:

The record-based shape has largely been superseded and greatly generalized by HTML-like labels. That is, instead of using shape=record, one might consider using shape=none and an HTML-like label.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜