Skip to content

Commit

Permalink
change svg file to html
Browse files Browse the repository at this point in the history
  • Loading branch information
naylor-b committed Mar 27, 2024
1 parent 90f3a2e commit 2288338
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions openmdao/visualization/graph_viewer.py
Expand Up @@ -590,6 +590,9 @@ def write_graph(G, prog='dot', display=True, outfile='graph.svg'):
except AttributeError:
raise AttributeError(f"pydot graph has no 'create_{ext}' method.")

if ext == 'svg':
outfile = outfile.replace('.svg', '.html')

with open(outfile, 'wb') as f:
f.write(pstr)

Expand Down

0 comments on commit 2288338

Please sign in to comment.