##// END OF EJS Templates
Backport PR #6587 : Support %matplotlib qt5 and %matplotlib nbagg
Thomas Kluyver -
Show More
@@ -35,7 +35,9 b" backends = {'tk': 'TkAgg',"
35 'wx': 'WXAgg',
35 'wx': 'WXAgg',
36 'qt': 'Qt4Agg', # qt3 not supported
36 'qt': 'Qt4Agg', # qt3 not supported
37 'qt4': 'Qt4Agg',
37 'qt4': 'Qt4Agg',
38 'qt5': 'Qt5Agg',
38 'osx': 'MacOSX',
39 'osx': 'MacOSX',
40 'nbagg': 'nbAgg',
39 'inline' : 'module://IPython.kernel.zmq.pylab.backend_inline'}
41 'inline' : 'module://IPython.kernel.zmq.pylab.backend_inline'}
40
42
41 # We also need a reverse backends2guis mapping that will properly choose which
43 # We also need a reverse backends2guis mapping that will properly choose which
@@ -14,6 +14,7 b''
14 # Imports
14 # Imports
15 #-----------------------------------------------------------------------------
15 #-----------------------------------------------------------------------------
16
16
17 import os
17 import sys
18 import sys
18
19
19 # System library imports
20 # System library imports
@@ -64,6 +65,11 b' def loop_qt4(kernel):'
64
65
65 start_event_loop_qt4(kernel.app)
66 start_event_loop_qt4(kernel.app)
66
67
68 def loop_qt5(kernel):
69 """Start a kernel with PyQt5 event loop integration"""
70 os.environ['QT_API'] = 'pyqt5'
71 return loop_qt4(kernel)
72
67
73
68 def loop_wx(kernel):
74 def loop_wx(kernel):
69 """Start a kernel with wx event loop support."""
75 """Start a kernel with wx event loop support."""
@@ -228,7 +234,9 b' def loop_cocoa(kernel):'
228 loop_map = {
234 loop_map = {
229 'qt' : loop_qt4,
235 'qt' : loop_qt4,
230 'qt4': loop_qt4,
236 'qt4': loop_qt4,
237 'qt5': loop_qt5,
231 'inline': None,
238 'inline': None,
239 'nbagg': None,
232 'osx': loop_cocoa,
240 'osx': loop_cocoa,
233 'wx' : loop_wx,
241 'wx' : loop_wx,
234 'tk' : loop_tk,
242 'tk' : loop_tk,
General Comments 0
You need to be logged in to leave comments. Login now