Show More
@@ -23,6 +23,7 b" backends = {'tk': 'TkAgg'," | |||||
23 | 'osx': 'MacOSX', |
|
23 | 'osx': 'MacOSX', | |
24 | 'nbagg': 'nbAgg', |
|
24 | 'nbagg': 'nbAgg', | |
25 | 'notebook': 'nbAgg', |
|
25 | 'notebook': 'nbAgg', | |
|
26 | 'agg': 'agg', | |||
26 | 'inline' : 'module://ipykernel.pylab.backend_inline'} |
|
27 | 'inline' : 'module://ipykernel.pylab.backend_inline'} | |
27 |
|
28 | |||
28 | # We also need a reverse backends2guis mapping that will properly choose which |
|
29 | # We also need a reverse backends2guis mapping that will properly choose which | |
@@ -245,7 +246,7 b' def find_gui_and_backend(gui=None, gui_select=None):' | |||||
245 | Parameters |
|
246 | Parameters | |
246 | ---------- |
|
247 | ---------- | |
247 | gui : str |
|
248 | gui : str | |
248 | Can be one of ('tk','gtk','wx','qt','qt4','inline'). |
|
249 | Can be one of ('tk','gtk','wx','qt','qt4','inline','agg'). | |
249 | gui_select : str |
|
250 | gui_select : str | |
250 | Can be one of ('tk','gtk','wx','qt','qt4','inline'). |
|
251 | Can be one of ('tk','gtk','wx','qt','qt4','inline'). | |
251 | This is any gui already selected by the shell. |
|
252 | This is any gui already selected by the shell. | |
@@ -253,7 +254,7 b' def find_gui_and_backend(gui=None, gui_select=None):' | |||||
253 | Returns |
|
254 | Returns | |
254 | ------- |
|
255 | ------- | |
255 | A tuple of (gui, backend) where backend is one of ('TkAgg','GTKAgg', |
|
256 | A tuple of (gui, backend) where backend is one of ('TkAgg','GTKAgg', | |
256 | 'WXAgg','Qt4Agg','module://ipykernel.pylab.backend_inline'). |
|
257 | 'WXAgg','Qt4Agg','module://ipykernel.pylab.backend_inline','agg'). | |
257 | """ |
|
258 | """ | |
258 |
|
259 | |||
259 | import matplotlib |
|
260 | import matplotlib | |
@@ -261,6 +262,8 b' def find_gui_and_backend(gui=None, gui_select=None):' | |||||
261 | if gui and gui != 'auto': |
|
262 | if gui and gui != 'auto': | |
262 | # select backend based on requested gui |
|
263 | # select backend based on requested gui | |
263 | backend = backends[gui] |
|
264 | backend = backends[gui] | |
|
265 | if gui == 'agg': | |||
|
266 | gui = None | |||
264 | else: |
|
267 | else: | |
265 | # We need to read the backend from the original data structure, *not* |
|
268 | # We need to read the backend from the original data structure, *not* | |
266 | # from mpl.rcParams, since a prior invocation of %matplotlib may have |
|
269 | # from mpl.rcParams, since a prior invocation of %matplotlib may have |
General Comments 0
You need to be logged in to leave comments.
Login now