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

Skip to content

Commit b5b8f25

Browse files
committed
Fix bug in last commit and in matplotlib.use
svn path=/trunk/matplotlib/; revision=5420
1 parent 2389b09 commit b5b8f25

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

lib/matplotlib/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -763,6 +763,7 @@ def use(arg, warn=True):
763763
"""
764764
if 'matplotlib.backends' in sys.modules:
765765
if warn: warnings.warn(_use_error_msg)
766+
return
766767
arg = arg.lower()
767768
be_parts = arg.split('.')
768769
name = validate_backend(be_parts[0])

lib/matplotlib/rcsetup.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
from matplotlib.fontconfig_pattern import parse_fontconfig_pattern
1313
from matplotlib.colors import is_color_like
1414

15-
interactive_bk = ['GTK', 'GTKAgg', 'GTKCairo', 'FltkAgg', 'QtAgg', 'Qt4Agg',
16-
'TkAgg', 'WX', 'WXAgg', 'CocoaAgg']
17-
non_interactive_bk = ['Agg', 'Cairo', 'EMF', 'GDK',
18-
'Pdf', 'PS', 'SVG', 'Template']
15+
interactive_bk = ['gtk', 'gtkagg', 'gtkcairo', 'fltkagg', 'qtagg', 'qt4agg',
16+
'tkagg', 'wx', 'wxagg', 'cocoaagg']
17+
non_interactive_bk = ['agg', 'cairo', 'emv', 'gdk',
18+
'pdf', 'ps', 'svg', 'template']
1919
all_backends = interactive_bk + non_interactive_bk
2020

2121

0 commit comments

Comments
 (0)