Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f118405

Browse files
committed
MNT: Set the module level backend in pylab_setup
1 parent 397bfc7 commit f118405

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

lib/matplotlib/backends/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,12 @@ def pylab_setup(name=None):
4040
'''
4141
# Import the requested backend into a generic module object
4242
if name is None:
43+
# validates, to match all_backends
44+
name = matplotlib.get_backend()
4345
# need to keep a global reference to the backend for compatibility
4446
# reasons. See https://github.com/matplotlib/matplotlib/issues/6092
4547
global backend
46-
name = backend
48+
backend = name
4749
if name.startswith('module://'):
4850
backend_name = name[9:]
4951
else:

0 commit comments

Comments
 (0)