Question regarding static graph #152
-
Hi @formersbach, |
Beta Was this translation helpful? Give feedback.
Answered by
formersbach
Jul 21, 2022
Replies: 1 comment 1 reply
-
Yes it's possible, although somewhat tedious. model = create_model('path.to.model')
model.to_graph()
G = model.graph
G.nodes Then each node can be edited using: n = G.get_node('nodename')
n.attr["shape"] = "triangle"
#Equivalent to using "-Nshape=paralellogram" in static_plot() :
for node in G.nodes:
n = G.get_node[node]
n.attr["shape"] = "paralellogram" Detailed available attributes can be found in graphviz doc and pygraphviz doc. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
himoto
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes it's possible, although somewhat tedious.
You will have to define the shape of each node individually. You can get a list of nodes using:
Then each node can be edited using:
Detailed available attributes can be found in graphviz doc and pygraphviz doc.
Hope this answers your question!