Skip to content

Commit

Permalink
Fix plot with missing graphviz
Browse files Browse the repository at this point in the history
  • Loading branch information
j-ti committed May 8, 2024
1 parent 8b33b0a commit 14e73ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions simply/power_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ def plot(self, show=True):
# plot_hierarchical(self.network)
try:
plot_topology_graphvis(self.network)
except ImportError:
# In case dot is not installed
except (ImportError, FileNotFoundError):
# In case dot/Graphviz is not installed
nx.draw(self.network, with_labels=True, font_weight="bold", node_size=50)

if show:
Expand Down

0 comments on commit 14e73ec

Please sign in to comment.