导航

graphviz 的节点形状

Posted on 2015-11-05 18:43  蝈蝈俊  阅读(2412)  评论(0编辑  收藏  举报

graphviz 的节点可以定义不同的外形,比如下面的定义,

digraph tt1{
    a[shape=box];
    c[shape=lpromoter];
    d[shape=doubleoctagon];
    a -> b;
    c -> d;
    d -> b;
}

会产生下面的图形:

image

 

具体 graphviz 支持的节点形状如下图:

来源:http://www.graphviz.org/doc/info/shapes.html

image

需要注意的是:

The geometries of polygon-based shapes are also affected by the node attributes regular, peripheries and orientation. If shape="polygon", the attributes sides, skew and distortion are also used. If unset, they default to 4, 0.0 and 0.0, respectively.