I'm trying to visualize an automaton in pygraphviz
, like the example in graphviz documentation:
I've found that node shapes can be changed like:
A.node_attr['shape']='circle' # A is a pygraphviz AGraph
This changes the shape of all nodes, but I want to use different node shapes for different nodes (some 'circle'
and some 'doublecircle'
). Any advice for doing that?
Note: I'm using pygraphviz
because I want to use networkx
graph objects and those can be converted to AGraph
objects of pygraphviz
. Also, apparently networkx
can't produce graph visualizations like this.