When i use graphviz's subgraph in python, I found it's hard to change subgraph's shape from rectangle to ellipse or circle. How can i do this? the code is below
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()
the image is: