的Graphviz:如何改变边框颜色
问题描述:
给出一个节点像这样,在白色背景上的Graphviz:如何改变边框颜色
"test" [
style="filled,dashed"
shape=box
color=lightgray
label="Hello World"
];
如何使虚线框黑?
答
我发现了一个适用于我的案例的解决方案。
"test" [
style="filled,dashed"
shape=box
color=black
fillcolor=lightgray
label="Hello World"
];
这是误导,因为如果没有指定fillcolor
时,似乎它会默认为color
。
+4
正确。正如文档所述,[如果fillcolor未定义,则使用颜色](http://www.graphviz.org/content/attrs#dfillcolor)。 – ryandesign 2012-02-03 01:59:37
答
所以实际上,你可以用一个较小的线得到这样的:
"test" [
style="filled,dashed"
shape=box
fillcolor=lightgray
label="Hello World"
];
在我的测试至少包括没有color
默认为黑色边境fillcolor
。
另外:http://stackoverflow.com/questions/7168549/dot-how-to-decorate-graph-nodes-with-black-outline-while-filled-with-another-co – webwesen 2013-06-04 16:14:00