如何在点文件中用椭圆形节点中的竖线分隔?
How can I separate with vertical bar in ellipse shape node in dot file?
我想画一个像这张图一样干净的网络图。
但我找不到如何执行此操作。我必须使用 css 来删除部分单元格边框线,但据我所知,不支持点文件 css。我想插入椭圆形节点,用竖线分隔节点,
如何绘制满足这些条件的图形?我的点文件有自循环,所以我不能使用 networkx。还有其他方法吗?或者我可以解决使用点文件吗?
我的点文件代码是
digraph {
// size = "6,8.5";
// ratio = "fill";
// layout = "circo"
forcelabels = True;
graph[overlap=False];
node [shape = ellipse];
node [fontsize = 10];
// node [penwidth = 3];
edge [fontsize = 10];
// A [pos = "0,2"]
// B [pos = "-2,-2"]
// C [pos = "0,1"]
// D [pos = "2,-2"]
// E [pos = "0,-3"]
A
B
C
D
E;
node[shape = point];
x1[style = invis]
{rank=same; A,C}
{rank=same; B,E}
A -> C [label = "4|1.0\l"];
B -> B [label = "1|:0.979\l"];
C:nw -> C:ne [label = "3|0.167\l"];
C -> D [label = "5|0.115\l"];
D:nw -> C:sw [xlabel = "3|0.103\l4|0:0.315\l"];
D:se -> x1 [dir = none]
x1 -> D:sw [xlabel = "5|0.308\l6|0:0.253\l"];
E -> B [label = "4|0.5\l"];
E -> D [label = "6|0.5\l"];
}
创建节点的两种方法,一种相当接近(对我来说很好)并且很容易复制。另一个将允许您重新创建您的示例,但需要使用两个程序(dot 和一个程序在 svg 中创建单独的节点——比如 Inkscape)
digraph structs {
// if oblong is good enough, this works
node [shape=none]
try3 [label=<
<TABLE border="1" cellborder="0" cellspacing="0" cellpadding="0" style="rounded" >
<TR><TD width="40">A</TD><VR/><TD width="40">*111<BR/>*101<BR/>*011</TD></TR>
</TABLE>>];
// if you really want a circular node, perfectly split
// create the node images with another program (like Inkscape)
// and include as an image
try5 [image="/tmp/split1.svg" label=""]
}
生产:
我想画一个像这张图一样干净的网络图。
但我找不到如何执行此操作。我必须使用 css 来删除部分单元格边框线,但据我所知,不支持点文件 css。我想插入椭圆形节点,用竖线分隔节点, 如何绘制满足这些条件的图形?我的点文件有自循环,所以我不能使用 networkx。还有其他方法吗?或者我可以解决使用点文件吗?
我的点文件代码是
digraph {
// size = "6,8.5";
// ratio = "fill";
// layout = "circo"
forcelabels = True;
graph[overlap=False];
node [shape = ellipse];
node [fontsize = 10];
// node [penwidth = 3];
edge [fontsize = 10];
// A [pos = "0,2"]
// B [pos = "-2,-2"]
// C [pos = "0,1"]
// D [pos = "2,-2"]
// E [pos = "0,-3"]
A
B
C
D
E;
node[shape = point];
x1[style = invis]
{rank=same; A,C}
{rank=same; B,E}
A -> C [label = "4|1.0\l"];
B -> B [label = "1|:0.979\l"];
C:nw -> C:ne [label = "3|0.167\l"];
C -> D [label = "5|0.115\l"];
D:nw -> C:sw [xlabel = "3|0.103\l4|0:0.315\l"];
D:se -> x1 [dir = none]
x1 -> D:sw [xlabel = "5|0.308\l6|0:0.253\l"];
E -> B [label = "4|0.5\l"];
E -> D [label = "6|0.5\l"];
}
创建节点的两种方法,一种相当接近(对我来说很好)并且很容易复制。另一个将允许您重新创建您的示例,但需要使用两个程序(dot 和一个程序在 svg 中创建单独的节点——比如 Inkscape)
digraph structs {
// if oblong is good enough, this works
node [shape=none]
try3 [label=<
<TABLE border="1" cellborder="0" cellspacing="0" cellpadding="0" style="rounded" >
<TR><TD width="40">A</TD><VR/><TD width="40">*111<BR/>*101<BR/>*011</TD></TR>
</TABLE>>];
// if you really want a circular node, perfectly split
// create the node images with another program (like Inkscape)
// and include as an image
try5 [image="/tmp/split1.svg" label=""]
}
生产: