【问题标题】:Change subgraph cluster shape to rounded rectangle将子图簇形状更改为圆角矩形
【发布时间】:2018-08-14 19:04:11
【问题描述】:

我有以下图表:

digraph G {rankdir="LR"; 
node [fontname = "font-awesome"];
subgraph cluster17 {
    2 [id=2, shape=rect;color="#A4A4A4";fillcolor="white";label=<<TABLE BORDER="0">
    <TR><TD>1:10</TD></TR>
    </TABLE>>, style="filled",fontsize=6,fixedsize=true,width=0.5,height=0.2,shape=Mrecord];

    2 -> 4 [id="2t4",color="#717070",arrowsize=.5];

    subgraph cluster3 {
        4 [id=4,fillcolor="#F5BDA2", shape=rect;label=<<TABLE BORDER="0">
        <TR><TD>1:12</TD></TR>
        </TABLE>>, style="filled",shape=Mrecord];
        5 [id=5,fillcolor="#F5BDA2", shape=rect;label=<<TABLE BORDER="0">
        <TR><TD>1:13</TD></TR>
        </TABLE>>, style="filled",shape=Mrecord];
        6 [id=6,fillcolor="#F5BDA2", shape=rect;label=<<TABLE BORDER="0">
        <TR><TD>1:14</TD></TR>
        </TABLE>>, style="filled",shape=Mrecord];
        7 [id=7,fillcolor="#F5BDA2", shape=rect;label=<<TABLE BORDER="0">
        <TR><TD>1:15</TD></TR>
        </TABLE>>, style="filled",shape=Mrecord];
        8 [id=8,fillcolor="#F5BDA2", shape=rect;label=<<TABLE BORDER="0">
        <TR><TD>1:19</TD></TR>
        </TABLE>>, style="filled",shape=Mrecord];

        6 -> 7 [id="6t7",color="#717070",arrowsize=.5]; 
        4 -> 5 [id="4t5",color="#717070",arrowsize=.5];
        8 -> 4[id="8t4",color="#717070",arrowsize=.5];
        5 -> 6 [id="5t6",color="#717070",arrowsize=.5];
        7 -> 8 [id="7t8",color="#717070",arrowsize=.5];

        label=<<TABLE BORDER="0">
        <TR><TD>Loop</TD></TR>
        <TR><TD>1:11</TD></TR>
        </TABLE>>;
        style="filled"
        fillcolor="#EDF1F2"
        color="#028d35"

        id=3
    }

    4 -> 10 [id="4t10",color="#717070",arrowsize=.5];
    10 [id=10, shape=rect;color="#A4A4A4";fillcolor="white";label=<<TABLE BORDER="0">
    <TR><TD>1:20</TD></TR>
    </TABLE>>,fontsize=6,fixedsize=true,width=0.5,height=0.2,shape=Mrecord, style="filled"];

    label=<<TABLE BORDER="0">
    <TR><TD>1:9</TD></TR>
    </TABLE>>;
    style="filled"
    fillcolor="#EDF1F2"
    color="#A4A4A4"
    id=17
}
}

它给出了以下图表: 我想将cluster3 的图形更改为圆角矩形。我尝试插入shape=Mrecord,但它不起作用。 如何将簇的形状更改为圆角矩形?

【问题讨论】:

    标签: graphviz dot


    【解决方案1】:

    而不是

    style="filled"
    

    你可以使用

        style="rounded"
        bgcolor="#028d35"
    

    样式rounded不使用fillcolor,而是使用bgcolor

    【讨论】:

    • 它对我有用的唯一方法是使用style="rounded,filled",因为根据the docs:“在2005 年4 月26 日之前,圆形和填充样式是相互排斥的。” (这意味着它们不再存在)
    【解决方案2】:

    这些是集群的有效styles

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-07-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多