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

Skip to content

Commit bb8a16a

Browse files
committed
Remove case-sensitivity for backend selection. (Not a user-visible problem)
svn path=/trunk/matplotlib/; revision=4985
1 parent 1137214 commit bb8a16a

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

lib/matplotlib/mathtext.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2656,12 +2656,12 @@ class MathTextParser(object):
26562656
_parser = None
26572657

26582658
_backend_mapping = {
2659-
'Bitmap': MathtextBackendBitmap,
2660-
'Agg' : MathtextBackendAgg,
2661-
'PS' : MathtextBackendPs,
2662-
'Pdf' : MathtextBackendPdf,
2663-
'SVG' : MathtextBackendSvg,
2664-
'Cairo' : MathtextBackendCairo
2659+
'bitmap': MathtextBackendBitmap,
2660+
'agg' : MathtextBackendAgg,
2661+
'ps' : MathtextBackendPs,
2662+
'pdf' : MathtextBackendPdf,
2663+
'svg' : MathtextBackendSvg,
2664+
'cairo' : MathtextBackendCairo
26652665
}
26662666

26672667
_font_type_mapping = {
@@ -2672,7 +2672,7 @@ class MathTextParser(object):
26722672
}
26732673

26742674
def __init__(self, output):
2675-
self._output = output
2675+
self._output = output.lower()
26762676
self._cache = maxdict(50)
26772677

26782678
def parse(self, s, dpi = 72, prop = None):
@@ -2689,7 +2689,7 @@ def parse(self, s, dpi = 72, prop = None):
26892689
else:
26902690
backend = self._backend_mapping[self._output]()
26912691
fontset = rcParams['mathtext.fontset']
2692-
fontset_class = self._font_type_mapping.get(fontset)
2692+
fontset_class = self._font_type_mapping.get(fontset.lower())
26932693
if fontset_class is not None:
26942694
font_output = fontset_class(prop, backend)
26952695
else:

0 commit comments

Comments
 (0)