Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个将图形打印为 .dot 文件的脚本。我想用不同的颜色突出所有不同程度的顶点。Graphviz 可以吗?
所以,我对以下内容感兴趣:
For each i-degree vertex use color[i].
作为一个特例,如何用独特的颜色标记树上的所有叶子?:
For each 1-degree vertex use color_A.
尝试使用 graphviz 实用程序 gvpr 来编写图形脚本。尤其,
gvpr -c 'N[度==1]{color="red"}'
您可以增强它以定义一个数组(或关联映射)并查找 color[$.degree]
斯蒂芬诺斯