Skip to content

Commit 0a6beed

Browse files
authored
Merge pull request matplotlib#26516 from anntzer/im
Replace reference to %pylab by %matplotlib.
2 parents bba391d + e2d45d5 commit 0a6beed

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lib/matplotlib/backend_bases.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3412,9 +3412,9 @@ def show(cls, *, block=None):
34123412
"""
34133413
Show all figures.
34143414
3415-
`show` blocks by calling `mainloop` if *block* is ``True``, or if it
3416-
is ``None`` and we are neither in IPython's ``%pylab`` mode, nor in
3417-
`interactive` mode.
3415+
`show` blocks by calling `mainloop` if *block* is ``True``, or if it is
3416+
``None`` and we are not in `interactive` mode and if IPython's
3417+
``%matplotlib`` integration has not been activated.
34183418
"""
34193419
managers = Gcf.get_all_fig_managers()
34203420
if not managers:
@@ -3427,9 +3427,9 @@ def show(cls, *, block=None):
34273427
if cls.mainloop is None:
34283428
return
34293429
if block is None:
3430-
# Hack: Are we in IPython's %pylab mode? In pylab mode, IPython
3431-
# (>= 0.10) tacks a _needmain attribute onto pyplot.show (always
3432-
# set to False).
3430+
# Hack: Is IPython's %matplotlib integration activated? If so,
3431+
# IPython's activate_matplotlib (>= 0.10) tacks a _needmain
3432+
# attribute onto pyplot.show (always set to False).
34333433
pyplot_show = getattr(sys.modules.get("matplotlib.pyplot"), "show", None)
34343434
ipython_pylab = hasattr(pyplot_show, "_needmain")
34353435
block = not ipython_pylab and not is_interactive()

0 commit comments

Comments
 (0)