4

我正在用 graphviz 绘制图表。即使我有penwidth=0节点,我仍然看到节点边界。如何摆脱节点边界?

我在点中的注释是这样的:

strict graph  {
    graph [bgcolor=white];
    0    [fillcolor=red,
        style=filled,
        shape=octagon,
        penwidht=0,
        fontsize=10,
        fixedsize=True,
        width=0.5,
        height=0.5,
        type=3];
    2    [shape=octagon,
        style=filled,
        fillcolor=gray,
        penwidth=0];
    0 -- 2  [penwidth=0.5,
        color=gray];
}
4

3 回答 3

8

这对我有用:

node [shape=plaintext]

资料来源:https ://renenyffenegger.ch/notes/tools/Graphviz/examples/index

于 2018-09-06T18:33:53.853 回答
4

问题是你有一个错字。

penwidht应该penwidth

strict graph  {
    graph [bgcolor=white];
    0    [fillcolor=red,
        style=filled,
        shape=octagon,
        penwidth=0,
        fontsize=10,
        fixedsize=True,
        width=0.5,
        height=0.5,
        type=3];
    2    [shape=octagon,
        style=filled,
        fillcolor=gray,
        penwidth=0];
    0 -- 2  [penwidth=0.5,
        color=gray];
}
于 2019-06-12T10:21:57.430 回答
2

setlinewidth 对我有用:

strict graph  {
    graph [bgcolor=white];
    0    [fillcolor=red,
        style="filled,setlinewidth(0)",
        shape=octagon,
    penwidht=0,
        fontsize=10,
        fixedsize=True,
        width=0.5,
        height=0.5,
        type=3];
    2    [shape=octagon,
        style=filled,
        fillcolor=gray,
        penwidth=0];
    0 -- 2  [penwidth=0.5,
        color=gray];
}
于 2011-05-05T22:29:59.343 回答