Graphviz:减少倾斜多边形节点上的边距
Graphviz: reducing margin on skewed polygon node
我想在 Graphviz 上使用倾斜的多边形(又名平行四边形),问题是平行四边形边框和它的文本之间 space 太多了。
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
并指定节点的宽度和高度(通过反复试验)产生:
我想在 Graphviz 上使用倾斜的多边形(又名平行四边形),问题是平行四边形边框和它的文本之间 space 太多了。
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
并指定节点的宽度和高度(通过反复试验)产生: