graphviz:子图具有相同的节点,如何唯一 [英] graphviz: subgraph has same node, how to unique

查看:417
本文介绍了graphviz:子图具有相同的节点,如何唯一的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用我的perl脚本创建点文件.这是包含相同节点的子图.例如:

I create dot file by my perl script. here is subgraphs which contains same node. eg:

subgraph {aa-> bb-> cc;}

subgraph{aa->bb->cc;}

subgraph {dd-> bb-> ee;}

subgraph{dd->bb->ee;}

我知道那些子图使用相同的名称空间,所以我的结果输出是一团糟.

I know those subgraph use same namespace, so my result output is a mess.

在每个子图中,我可以使其变得唯一,例如下面的bb和bb_1,

In each subgraph, I can make them unique, like bb and bb_1 below,

子图{aa-> bb-> cc; bb_1-> dd;}

subgraph{aa->bb->cc; bb_1->dd;}

但是很难使所有子图中的所有节点唯一.

but it hard to make all node in all subgraphs unique.

请帮助.是否有一些方法可以使每个子图严格"或使用不同的命名空间?

please help. if here is some methods to make each subgraph "strict" or use different namespace?

推荐答案

为节点显示的标签仅在未由显式引用覆盖的情况下才与该节点的名称相关.

The label presented for a node is only related to the name of the node if it is not overridden by an explicit references.

例如,可以使用"45" [label = "bb"]; "53" [label = "bb"];表示具有相同标签的两个节点.

For example, you can use "45" [label = "bb"]; "53" [label = "bb"]; to represent two nodes that have the same label.

然后

subgraph{aa->"45"->cc;}
subgraph{dd->"53"->ee;}

将使用每个节点的内部ID进行标识,以便随后可以在许多位置重复使用相同的标签.

will use the internal id of each node to identify it so that you can then reuse the same label in many locations.

这篇关于graphviz:子图具有相同的节点,如何唯一的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆