Graphviz:减少倾斜多边形节点上的边距
我想在Graphviz上使用一个倾斜多边形(也称为平行四边形),问题是平行四边形边框和文本之间的空间太大Graphviz:减少倾斜多边形节点上的边距,graphviz,dot,Graphviz,Dot,我想在Graphviz上使用一个倾斜多边形(也称为平行四边形),问题是平行四边形边框和文本之间的空间太大 digraph G { poly1[margin=0, width=0, height=0, shape=polygon, label="This is a polygon\nwithout skew"] poly2[margin=0, width=0, height=0, shape=polygon, label="This is a polygon\nwith skew"
digraph G {
poly1[margin=0, width=0, height=0, shape=polygon, label="This is a polygon\nwithout skew"]
poly2[margin=0, width=0, height=0, shape=polygon, label="This is a polygon\nwith skew", skew=0.3]
}
这是前面代码的结果:
如您所见,只要我设置了一个歪斜值(在这种情况下,skew=0.3
),多边形的内部边距就会增加很多。设置margin=0
、width=0
和height=0
不能解决问题
有没有办法删除多边形的内部边距?有办法,但效果不太好:
digraph G {
poly1[margin=0, width=0, height=0, shape=polygon, label="This is a polygon\nwithout skew"]
poly2[margin=0, width=1.8, height=0.46, shape=polygon, fixedsize=true, label="This is a polygon\nwith skew", skew=0.3]
}
添加fixedsize=true
并指定节点的宽度和高度(通过尝试和错误)会产生以下结果: