Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit dc2402d

Browse files
committed
MNT: try using a simpler way of not messing with mpl state
1 parent d762969 commit dc2402d

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

lib/matplotlib/backend_bases.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1669,11 +1669,7 @@ def _fix_ipython_backend2gui(cls):
16691669
if _is_non_interactive_terminal_ipython(ip):
16701670
pass
16711671
else:
1672-
was_interactive = mpl.is_interactive()
1673-
try:
1674-
ip.enable_matplotlib()
1675-
finally:
1676-
mpl.interactive(was_interactive)
1672+
ip.enable_gui()
16771673

16781674
finally:
16791675
mpl.rcParamsOrig["backend"] = orig_origbackend

0 commit comments

Comments
 (0)