如何在graphviz点节点的表标签中左对齐多行文本文字?
我有这样一个graphviz点文件如何在graphviz点节点的表标签中左对齐多行文本文字?,graph,label,graphviz,Graph,Label,Graphviz,我有这样一个graphviz点文件test.dot,包含一个带有表标签的节点: digraph { node [shape=none, fontname="Courier New, Courier"] edge [fontname="Courier New, Courier"] graph [fontname="Courier New, Courier"] id2765 [label=<<T
test.dot
,包含一个带有表标签的节点:
digraph {
node [shape=none, fontname="Courier New, Courier"]
edge [fontname="Courier New, Courier"]
graph [fontname="Courier New, Courier"]
id2765 [label=<<TABLE CELLBORDER="1" CELLSPACING="0" BORDER="0">
<TR><TD PORT="cell756">literal</TD><TD PORT="cell757" ALIGN="LEFT">"""--- multiple line string literal with unicode ---
here we begin with some comments \\u0020 \\U00000000 \\u1234 \\u20AC \\U00008000:
multiple string literal begins and ends with triple quotes \\"\\"\\",
then newline are enabled in it.
here we test back slask \\r\\n \\' \\" \\? \\a \\b \\f \\n \\r \\t \\v \\\\.
"""</TD></TR>
</TABLE>>]
}
使用dot-Tpng test.dot-o test.dot.png
编译,其输出:
您可以看到文本文字中没有新行。所以我用ALIGN=“LEFT”
和
更新了test.dot
:
digraph {
node [shape=none, fontname="Courier New, Courier"]
edge [fontname="Courier New, Courier"]
graph [fontname="Courier New, Courier"]
id2765 [label=<<TABLE CELLBORDER="1" CELLSPACING="0" BORDER="0">
<TR><TD PORT="cell756">literal</TD><TD PORT="cell757" ALIGN="LEFT">"""--- multiple line string literal with unicode ---<BR/>here we begin with some comments \\u0020 \\U00000000 \\u1234 \\u20AC \\U00008000:<BR/> multiple string literal begins and ends with triple quotes \\"\\"\\",<BR/> then newline are enabled in it.<BR/> here we test back slask \\r\\n \\' \\" \\? \\a \\b \\f \\n \\r \\t \\v \\\\.<BR/> """</TD></TR>
</TABLE>>]
}
有向图{
节点[shape=none,fontname=“Courier New,Courier”]
edge[fontname=“快递新,快递”]
图形[fontname=“Courier New,Courier”]
id2765[label=将ALIGN=“LEFT”
添加到每个
和BALIGN=“LEFT”
中,如下所示:
digraph {
node [shape=none, fontname="Courier New, Courier"]
edge [fontname="Courier New, Courier"]
graph [fontname="Courier New, Courier"]
id2765 [label=<<TABLE CELLBORDER="1" CELLSPACING="0" BORDER="0">
<TR><TD PORT="cell756">literal</TD><TD PORT="cell757" ALIGN="LEFT" BALIGN="LEFT">"""--- multiple line string literal with unicode ---<BR ALIGN="LEFT"/>here we begin with some comments \\u0020 \\U00000000 \\u1234 \\u20AC \\U00008000:<BR ALIGN="LEFT"/> multiple string literal begins and ends with triple quotes \\"\\"\\",<BR ALIGN="LEFT"/> then newline are enabled in it.<BR ALIGN="LEFT"/> here we test back slask \\r\\n \\' \\" \\? \\a \\b \\f \\n \\r \\t \\v \\\\.<BR ALIGN="LEFT"/> """</TD></TR>
</TABLE>>]
}
有向图{
节点[shape=none,fontname=“Courier New,Courier”]
edge[fontname=“快递新,快递”]
图形[fontname=“Courier New,Courier”]
id2765[标签]=
digraph {
node [shape=none, fontname="Courier New, Courier"]
edge [fontname="Courier New, Courier"]
graph [fontname="Courier New, Courier"]
id2765 [label=<<TABLE CELLBORDER="1" CELLSPACING="0" BORDER="0">
<TR><TD PORT="cell756">literal</TD><TD PORT="cell757" ALIGN="LEFT" BALIGN="LEFT">"""--- multiple line string literal with unicode ---<BR ALIGN="LEFT"/>here we begin with some comments \\u0020 \\U00000000 \\u1234 \\u20AC \\U00008000:<BR ALIGN="LEFT"/> multiple string literal begins and ends with triple quotes \\"\\"\\",<BR ALIGN="LEFT"/> then newline are enabled in it.<BR ALIGN="LEFT"/> here we test back slask \\r\\n \\' \\" \\? \\a \\b \\f \\n \\r \\t \\v \\\\.<BR ALIGN="LEFT"/> """</TD></TR>
</TABLE>>]
}