Skip to content

Commit

Permalink
Fix bug in drawing.py
Browse files Browse the repository at this point in the history
matplotlib is imported lazily but was also checked for raising an importerror when .draw was called from shell.
  • Loading branch information
BenWillemsen authored Jan 31, 2024
1 parent c657667 commit afbea86
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions pyzx/drawing.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ def draw(g: Union[BaseGraph[VT,ET], Circuit], labels: bool=False, **kwargs) -> A
labels = labels or settings.show_labels

if get_mode() == "shell":
if plt is None:
raise ImportError("This function requires matplotlib.")
return draw_matplotlib(g, labels, **kwargs)
elif get_mode() == "browser":
return draw_d3(g, labels, **kwargs)
Expand Down

0 comments on commit afbea86

Please # to comment.