File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88import warnings
99
1010
11- def pylab_setup ():
12- 'return new_figure_manager, draw_if_interactive and show for pylab'
11+ def pylab_setup (backend = None ):
12+ '''return new_figure_manager, draw_if_interactive and show for pyplot
13+
14+ This provides the backend-specific functions that are used by
15+ pyplot to abstract away the difference between interactive backends.
16+
17+ Parameters
18+ ----------
19+ backend : str, optional
20+ The name of the backend to use. If `None`, falls back to
21+ ``matplotlib.get_backend()`` (which return ``rcParams['backend']``)
22+
23+ Returns
24+ -------
25+ backend_mod : module
26+ The module which contains the backend of choice
27+
28+ new_figure_manager : function
29+ Create a new figure manage (roughly maps to GUI window)
30+
31+ draw_if_interactive : function
32+ Redraw the current figure if pyplot is interactive
33+
34+ show : function
35+ Show (and possible block) any unshown figures.
36+
37+ '''
1338 # Import the requested backend into a generic module object
14- backend = matplotlib .get_backend () # validates, to match all_backends
39+ if backend is None :
40+ backend = matplotlib .get_backend () # validates, to match all_backends
1541
1642 if backend .startswith ('module://' ):
1743 backend_name = backend [9 :]
You can’t perform that action at this time.
0 commit comments