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

Skip to content

Commit a41204d

Browse files
committed
errors arose for some (but not all) of these parameters inside apostrophes. Removing the apostrophes seemed to work. I'm curious about why this occured for some but not all variables. Anyway, my test complained about these but not the others.
1 parent 6d79027 commit a41204d

3 files changed

Lines changed: 14 additions & 8 deletions

File tree

lib/matplotlib/tests/test_rcsetup.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,14 @@ def test_defaults():
1818
def test_template():
1919
# the current matplotlibrc.template should validate successfully
2020
mpl.rc_file(templaterc)
21-
for k, v in templateParams.iteritems():
22-
assert mpl.rcParams[k] == v[0]
21+
with mpl.rc_context(fname=templaterc):
22+
for k, v in mpl.rcsetup.defaultParams.iteritems():
23+
if mpl.rcParams[k] != v[0]:
24+
print k
25+
print v[0]
26+
print mpl.rcParams[k]
27+
print "---------------"
28+
assert mpl.rcParams[k] == v[0]
2329

2430

2531
def test_unicode():

lib/matplotlib/tests/test_rcsetup.rc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ text.dvipnghack : None # some versions of dvipng don't handle alpha
181181
# correction off. None will try and
182182
# guess based on your dvipng version
183183

184-
text.hinting : 'auto' # May be one of the following:
184+
text.hinting : auto # May be one of the following:
185185
# 'none': Perform no hinting
186186
# 'auto': Use freetype's autohinter
187187
# 'native': Use the hinting information in the
@@ -399,7 +399,7 @@ pdf.fonttype : 3 # Output Type 3 (Type3) or Type 42 (TrueType)
399399
# svg backend params
400400
svg.image_inline : True # write raster image data directly into the svg file
401401
svg.image_noscale : False # suppress scaling of raster data embedded in SVG
402-
svg.fonttype : 'path' # How to handle SVG fonts:
402+
svg.fonttype : path # How to handle SVG fonts:
403403
# 'none': Assume fonts are installed on the machine where the SVG will be viewed.
404404
# 'path': Embed characters as paths -- supported by most SVG renderers
405405
# 'svgfont': Embed characters as SVG fonts -- supported only by Chrome,
@@ -453,7 +453,7 @@ animation.writer : ffmpeg # MovieWriter 'backend' to use
453453
animation.codec : mp4 # Codec to use for writing movie
454454
animation.bitrate: -1 # Controls size/quality tradeoff for movie.
455455
# -1 implies let utility auto-determine
456-
animation.frame_format: 'png' # Controls frame format used by temp files
456+
animation.frame_format: png # Controls frame format used by temp files
457457
animation.ffmpeg_path: 'ffmpeg' # Path to ffmpeg binary. Without full path
458458
# $PATH is searched
459459
animation.ffmpeg_args: '' # Additional arguments to pass to ffmpeg

matplotlibrc.template

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ backend : %(backend)s
181181
# correction off. None will try and
182182
# guess based on your dvipng version
183183

184-
#text.hinting : 'auto' # May be one of the following:
184+
#text.hinting : auto # May be one of the following:
185185
# 'none': Perform no hinting
186186
# 'auto': Use freetype's autohinter
187187
# 'native': Use the hinting information in the
@@ -399,7 +399,7 @@ backend : %(backend)s
399399
# svg backend params
400400
#svg.image_inline : True # write raster image data directly into the svg file
401401
#svg.image_noscale : False # suppress scaling of raster data embedded in SVG
402-
#svg.fonttype : 'path' # How to handle SVG fonts:
402+
#svg.fonttype : path # How to handle SVG fonts:
403403
# 'none': Assume fonts are installed on the machine where the SVG will be viewed.
404404
# 'path': Embed characters as paths -- supported by most SVG renderers
405405
# 'svgfont': Embed characters as SVG fonts -- supported only by Chrome,
@@ -453,7 +453,7 @@ backend : %(backend)s
453453
#animation.codec : mp4 # Codec to use for writing movie
454454
#animation.bitrate: -1 # Controls size/quality tradeoff for movie.
455455
# -1 implies let utility auto-determine
456-
#animation.frame_format: 'png' # Controls frame format used by temp files
456+
#animation.frame_format: png # Controls frame format used by temp files
457457
#animation.ffmpeg_path: 'ffmpeg' # Path to ffmpeg binary. Without full path
458458
# $PATH is searched
459459
#animation.ffmpeg_args: '' # Additional arguments to pass to ffmpeg

0 commit comments

Comments
 (0)