[当我在python中使用graphviz的子图时,我发现很难将子图的形状从矩形更改为椭圆或圆形。我怎样才能做到这一点?代码在下面
from graphviz import Graph
g = Graph('G', filename='fdpclust.gv', engine='fdp')
with g.subgraph(name='clusterA',graph_attr ={'shape':'ellipse'}) as a:
a.node('a',fontname="SimSun",fontsize='29')
a.node('b')
with a.subgraph(name='clusterC',graph_attr ={'shape':'ellipse'}) as c:
c.attr(shape='ellipse')
c.node('C')
c.node('D')
with g.subgraph(name='clusterB',graph_attr ={'shape':'circle'}) as b:
b.node('d')
b.node('f')
g.view()
图像是:
[当我在python中使用graphviz的子图时,我发现很难将子图的形状从矩形更改为椭圆或圆形。我怎样才能做到这一点?下面的代码来自graphviz import Graph g = ...