File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 41
41
#import matplotlib.path as path
42
42
from matplotlib import rcParams
43
43
from matplotlib import is_interactive
44
+ from matplotlib import get_backend
44
45
from matplotlib ._pylab_helpers import Gcf
45
46
46
47
from matplotlib .transforms import Bbox , TransformedBbox , Affine2D
@@ -100,6 +101,10 @@ def __call__(self, block=None):
100
101
# IPython versions >= 0.10 tack the _needmain
101
102
# attribute onto pyplot.show, and always set
102
103
# it to False, when in --pylab mode.
104
+ ipython_pylab = ipython_pylab and get_backend () != 'WebAgg'
105
+ # TODO: The above is a hack to get the WebAgg backend
106
+ # working with `ipython --pylab` until proper integration
107
+ # is implemented.
103
108
except AttributeError :
104
109
ipython_pylab = False
105
110
@@ -108,7 +113,7 @@ def __call__(self, block=None):
108
113
if ipython_pylab :
109
114
return
110
115
111
- if not is_interactive ():
116
+ if not is_interactive () or get_backend () == 'WebAgg' :
112
117
self .mainloop ()
113
118
114
119
def mainloop (self ):
You can’t perform that action at this time.
0 commit comments