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

Skip to content

Commit f852c0c

Browse files
committed
Merge pull request #4875 from tacaswell/fix_inline_bug
FIX: add explict draw_if_interactive in figure()
2 parents 2060494 + 468f6e0 commit f852c0c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/matplotlib/pyplot.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -531,6 +531,13 @@ def make_active(event):
531531
_pylab_helpers.Gcf.set_active(figManager)
532532
figManager.canvas.figure.number = num
533533

534+
# make sure backends (inline) that we don't ship that expect this
535+
# to be called in plotting commands to make the figure call show
536+
# still work. There is probably a better way to do this in the
537+
# FigureManager base class.
538+
if matplotlib.is_interactive():
539+
draw_if_interactive()
540+
534541
if _INSTALL_FIG_OBSERVER:
535542
figManager.canvas.figure.add_callback(_auto_draw_if_interactive)
536543

0 commit comments

Comments
 (0)