【问题标题】:How can I hide the node boundary in graphviz?如何在graphviz中隐藏节点边界?
【发布时间】:2019-06-12 18:21:57
【问题描述】:

我正在用 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];
}

【问题讨论】:

    标签: graphviz dot graph-visualization


    【解决方案1】:

    这对我有用:

    node [shape=plaintext]
    

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

    【讨论】:

      【解决方案2】:

      问题是你有一个错字。

      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];
      }
      

      【讨论】:

        【解决方案3】:

        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];
        }
        

        【讨论】:

          猜你喜欢
          • 2010-12-15
          • 2012-10-03
          • 1970-01-01
          • 1970-01-01
          • 2020-06-19
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          相关资源
          最近更新 更多