gpt4 book ai didi

Graphviz:仅为基于记录的节点中的字段着色

转载 作者:行者123 更新时间:2023-12-04 00:57:05 24 4
gpt4 key购买 nike

有没有办法只为基于记录的节点中的字段添加颜色。像下面的例子一样,字段 struct2:f0 可以单独使用不同的颜色吗?

digraph structs {
node [shape=record];
struct1 [label="<f0> left|<f1> mid\ dle|<f2> right"];
struct2 [label="<f0> one|<f1> two"];
struct3 [label="hello\nworld |{ b |{c|<here> d|e}| f}| g | h"];
struct1:f1 -> struct2:f0;
struct1:f2 -> struct3:here;
}

谢谢

最佳答案

我不认为这是可能的。

您可以考虑使用 HTML-like labels - 您应该能够使用基于记录的节点执行您可以执行的所有操作,等等。

从上面链接的文档页面:

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.





Although HTML labels are not, strictly speaking, a shape, they can be viewed as a generalization of the record shapes described above. In particular, if a node has set its shape attribute to none or plaintext, the HTML label will be the node's shape.

关于Graphviz:仅为基于记录的节点中的字段着色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9009683/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com