Skip to content

Commit 4a3220b

Browse files
authored
Merge pull request #62 from HREHMAAN/svg-format
Use svg instead of png
2 parents a05d57c + 46abe5f commit 4a3220b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/modelgraph/gui.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ def dependency_graph():
3636
name = st.radio("Select parameter / expression", graph.dependent_names)
3737
G = graph.dependency_graph(name)
3838
P = nx.nx_pydot.to_pydot(G)
39-
with tempfile.NamedTemporaryFile(suffix=".png") as temp:
40-
P.write_png(temp.name)
39+
with tempfile.NamedTemporaryFile(suffix=".svg") as temp:
40+
P.write_svg(temp.name)
4141
st.image(temp.name)
4242

4343

@@ -49,8 +49,8 @@ def inv_dependency_graph():
4949
name = st.radio("Select parameter / expression", graph.inv_dependent_names)
5050
G = graph.inv_dependency_graph(name)
5151
P = nx.nx_pydot.to_pydot(G)
52-
with tempfile.NamedTemporaryFile(suffix=".png") as temp:
53-
P.write_png(temp.name)
52+
with tempfile.NamedTemporaryFile(suffix=".svg") as temp:
53+
P.write_svg(temp.name)
5454
st.image(temp.name)
5555

5656

0 commit comments

Comments
 (0)