1
0
Fork 0
Old engine for Continuous Time Bayesian Networks. Superseded by reCTBN. 🐍 https://github.com/madlabunimib/PyCTBN
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
PyCTBN/venv/share/doc/networkx-2.5/examples/graph/dot_atlas.py

26 lines
582 B

"""
======
Atlas2
======
Write first 20 graphs from the graph atlas as graphviz dot files
Gn.dot where n=0,19.
"""
import networkx as nx
from networkx.generators.atlas import graph_atlas_g
atlas = graph_atlas_g()[0:20]
for G in atlas:
print(
f"{G.name} has {nx.number_of_nodes(G)} nodes with {nx.number_of_edges(G)} edges"
)
A = nx.nx_agraph.to_agraph(G)
A.graph_attr["label"] = G.name
# set default node attributes
A.node_attr["color"] = "red"
A.node_attr["style"] = "filled"
A.node_attr["shape"] = "circle"
A.write(G.name + ".dot")