Skip to content

Commit

Permalink
Update bamt/display/display.py
Browse files Browse the repository at this point in the history
Co-authored-by: Yury Kaminsky <[email protected]>
  • Loading branch information
Roman223 and jrzkaminski authored Aug 11, 2023
1 parent 35b8c97 commit 48f8a84
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions bamt/display/display.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,13 @@ def _make_network(nodes, edges, **kwargs):
:param kwargs: a dict passed to pyvis.network.Network
"""
g = nx.DiGraph()
if not kwargs:
network_params = dict(
height="800px",
width="100%",
notebook=True,
directed=nx.is_directed(g),
layout="hierarchical",
)
else:
network_params = kwargs
network_params = dict(
height=kwargs.get('height', "800px"),
width=kwargs.get('width', "100%"),
notebook=kwargs.get('notebook', True),
directed=kwargs.get('directed', nx.is_directed(g)),
layout=kwargs.get('layout', "hierarchical")
)

g.add_nodes_from(nodes)
g.add_edges_from(edges)
Expand Down

0 comments on commit 48f8a84

Please sign in to comment.