【问题标题】:How can a UML class template be represented in Grapviz dotUML 类模板如何在 Graphviz dot 中表示
【发布时间】:2019-04-12 02:52:25
【问题描述】:

如何在 Graphviz dot 中生成如下图所示的 UML 类模板节点?

【问题讨论】:

    标签: uml graphviz dot pygraphviz


    【解决方案1】:

    使用 html 标签,例如:

    digraph top {
        N[shape=none label=<<table cellborder="0" border="0" cellspacing="0">
        <tr><td color="none" colspan="2" width="90" fixedsize="true"></td><td border="1" rowspan="2" colspan="2" cellpadding="0" style="dashed" width="70" fixedsize="true">PARAM</td></tr>
        <tr><td sides="LT" border="1" colspan="2"></td></tr>
        <tr><td sides="LR" border="1" rowspan="2" colspan="3" width="150" fixedsize="true">ClassName</td><td width="10" fixedsize="true"></td></tr>
        <tr><td></td></tr>
        <tr><td sides="LBR" border="1" colspan="3"></td><td height="8" fixedsize="true"><!--put height in seperate cell to avoid specify fixed width--></td></tr>
    </table>>]
    }
    

    在 viz-js.com 上呈现:

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-03-18
      • 1970-01-01
      相关资源
      最近更新 更多