##// END OF EJS Templates
Backport PR #4230: Switch correctly to the user's default matplotlib backend after inline....
MinRK -
Show More
@@ -0,0 +1,4 b''
1 We fixed an issue with switching between matplotlib inline and GUI backends,
2 but the fix requires matplotlib 1.1 or newer. So from now on, we consider
3 matplotlib 1.1 to be the minimally supported version for IPython. Older
4 versions for the most part will work, but we make no guarantees about it.
@@ -214,7 +214,11 b' def find_gui_and_backend(gui=None, gui_select=None):'
214 # select backend based on requested gui
214 # select backend based on requested gui
215 backend = backends[gui]
215 backend = backends[gui]
216 else:
216 else:
217 backend = matplotlib.rcParams['backend']
217 # We need to read the backend from the original data structure, *not*
218 # from mpl.rcParams, since a prior invocation of %matplotlib may have
219 # overwritten that.
220 # WARNING: this assumes matplotlib 1.1 or newer!!
221 backend = matplotlib.rcParamsOrig['backend']
218 # In this case, we need to find what the appropriate gui selection call
222 # In this case, we need to find what the appropriate gui selection call
219 # should be for IPython, so we can activate inputhook accordingly
223 # should be for IPython, so we can activate inputhook accordingly
220 gui = backend2gui.get(backend, None)
224 gui = backend2gui.get(backend, None)
General Comments 0
You need to be logged in to leave comments. Login now