graphviz:有没有办法只显示我定义的子图的一个子集或有一个黑白版本(禁用颜色)?
graphviz: is there a way to display only a subset of the subgraphs I have defined or have a B&W version(disable colors)?
这些方法简单吗
- 只显示我定义的子图的子集而不注释,否则?
- 禁用所有colors/have图表的黑白版本
谢谢
P.S:用于teaching/presentation目的
图层功能 (https://graphviz.org/faq/#FaqOverlays) is the "best" way to produce a subset graph. But there are severl oddities in the implementation (e.g. https://forum.graphviz.org/t/stupid-dot-tricks-2-making-a-video/109) 让它有点痛苦。一个例子:
digraph CL {
graph [layers="A:C:D"]
subgraph cluster1{
node [layer="A,C,D"]
a->b->c->{e f}
}
subgraph cluster11{
node [layer="C,D"]
ax->bx->{cx ex fx}
}
subgraph cluster12{
node [layer="D"]
ay->{by cy ey fy}
}
subgraph clusterZAZ{
node [layer="A,D"]
a55->{b55 c55 e55 frrrr}
}
// comment out the next line and see what happens
edge [layer=D] // this should not be necessary
ax->by
}
这里是生成C层的命令行:
dot -Tsvg -Glayerselect=C clusterLayers.gv >C.svg
也许 Inkscape (https://inkscape.org/) 将彩色 SVG 图形转换为黑白
这些方法简单吗
- 只显示我定义的子图的子集而不注释,否则?
- 禁用所有colors/have图表的黑白版本
谢谢
P.S:用于teaching/presentation目的
图层功能 (https://graphviz.org/faq/#FaqOverlays) is the "best" way to produce a subset graph. But there are severl oddities in the implementation (e.g. https://forum.graphviz.org/t/stupid-dot-tricks-2-making-a-video/109) 让它有点痛苦。一个例子:
digraph CL {
graph [layers="A:C:D"]
subgraph cluster1{
node [layer="A,C,D"]
a->b->c->{e f}
}
subgraph cluster11{
node [layer="C,D"]
ax->bx->{cx ex fx}
}
subgraph cluster12{
node [layer="D"]
ay->{by cy ey fy}
}
subgraph clusterZAZ{
node [layer="A,D"]
a55->{b55 c55 e55 frrrr}
}
// comment out the next line and see what happens
edge [layer=D] // this should not be necessary
ax->by
}
这里是生成C层的命令行:
dot -Tsvg -Glayerselect=C clusterLayers.gv >C.svg
也许 Inkscape (https://inkscape.org/) 将彩色 SVG 图形转换为黑白