Html 水平线错误graphviz
Html Horizontal line error graphviz
我需要创建子图集群,该集群具有与节点之间的线分隔的标签。
subgraph cluster_0{
label=< <B>process #1</B> <HR/> >
node [shape=none]
t1 [label="label1"]
t2 [label="label2"]
t3 [label="label 3"]
node [shape=box group=a style=filled fillcolor="red;.5:white" height=.2 label = "" ]
A [ fillcolor="red;0.3:white" ]
B [fillcolor="red;.9:white"]
C
node [shape=none fillcolor=white]
t11 [label="label1"]
t21 [label="label2"]
t31 [label="label 3"]
edge[style=invis];
A->B->C
t1->t2->t3
t11->t21->t31
}
然后我在
语法上出错。
错误堆栈
pydot.InvocationException: Program terminated with status: 1. stderr follows: Error: syntax error in line 1
... <HR/> ...
in label of graph cluster_0
我的 graphviz 版本是
点 - graphviz 版本 2.36.0 (20140111.2315)
在 graphviz 网站上,名为 "Node Shapes" 的页面包含 html 类标签的语法(大约一半):
对于<HR/>
,它表示:
rows : row
| rows row
| rows <HR/> row
这意味着 <HR/>
只允许在两行之间。并且行只允许在 <TABLE>
内,因此您必须将所有内容包装在 table 中,然后它可能会起作用。
根据您想要实现的目标,另一种可能的解决方案可能是使用 <U>text</U>
.
简单地 在标签下划线
我需要创建子图集群,该集群具有与节点之间的线分隔的标签。
subgraph cluster_0{
label=< <B>process #1</B> <HR/> >
node [shape=none]
t1 [label="label1"]
t2 [label="label2"]
t3 [label="label 3"]
node [shape=box group=a style=filled fillcolor="red;.5:white" height=.2 label = "" ]
A [ fillcolor="red;0.3:white" ]
B [fillcolor="red;.9:white"]
C
node [shape=none fillcolor=white]
t11 [label="label1"]
t21 [label="label2"]
t31 [label="label 3"]
edge[style=invis];
A->B->C
t1->t2->t3
t11->t21->t31
}
然后我在
语法上出错。 错误堆栈
pydot.InvocationException: Program terminated with status: 1. stderr follows: Error: syntax error in line 1
... <HR/> ...
in label of graph cluster_0
我的 graphviz 版本是 点 - graphviz 版本 2.36.0 (20140111.2315)
在 graphviz 网站上,名为 "Node Shapes" 的页面包含 html 类标签的语法(大约一半):
对于<HR/>
,它表示:
rows : row
| rows row
| rows <HR/> row
这意味着 <HR/>
只允许在两行之间。并且行只允许在 <TABLE>
内,因此您必须将所有内容包装在 table 中,然后它可能会起作用。
根据您想要实现的目标,另一种可能的解决方案可能是使用 <U>text</U>
.