Skip to content

Commit 48c5a83

Browse files
authored
Add fname to plot_network to specify output filename.
plot_network() is used to plot various types of networks. However, the name of the produced html-file was hard-coded to "citation.html". This change introduces a fname-parameter, that allows to specify other file-names. It defaults to "citation.html" to keep compability with previous versions.
1 parent cd270b4 commit 48c5a83

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

litstudy/network.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ def plot_network(
4040
controls=False,
4141
scale=1,
4242
iterations=1000,
43-
gravity=1
43+
gravity=1,
44+
fname='citation.html'
4445
):
4546
"""Plot a `networkx.Graph` generated by one of the `build_X_graph`
4647
functions in this module. Plotting is done using the `pyvis` library.
@@ -152,7 +153,7 @@ def plot_network(
152153
)
153154
)
154155

155-
return v.show("citation.html")
156+
return v.show(fname)
156157

157158

158159
def build_base_network(

0 commit comments

Comments
 (0)