Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 80689e2

Browse filesBrowse files
committed
Merge remote-tracking branch 'upstream/v1.2.x'
2 parents e5b0042 + 745bb21 commit 80689e2
Copy full SHA for 80689e2

File tree

Expand file treeCollapse file tree

3 files changed

+266
-58
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+266
-58
lines changed

‎lib/matplotlib/rcsetup.py

Copy file name to clipboardExpand all lines: lib/matplotlib/rcsetup.py
+10-1Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,15 @@ def validate_font_properties(s):
257257

258258
def deprecate_savefig_extension(value):
259259
warnings.warn("savefig.extension is deprecated. Use savefig.format instead.")
260+
return value
261+
262+
def update_savefig_format(value):
263+
# The old savefig.extension could also have a value of "auto", but
264+
# the new savefig.format does not. We need to fix this here.
265+
value = str(value)
266+
if value == 'auto':
267+
value = 'png'
268+
return value
260269

261270
validate_ps_papersize = ValidateInStrings('ps_papersize',[
262271
'auto', 'letter', 'legal', 'ledger',
@@ -567,7 +576,7 @@ def __call__(self, s):
567576
'savefig.edgecolor' : ['w', validate_color], # edgecolor; white
568577
'savefig.orientation' : ['portrait', validate_orientation], # edgecolor; white
569578
'savefig.extension' : ['png', deprecate_savefig_extension], # what to add to extensionless filenames
570-
'savefig.format' : ['png', str], # value checked by backend at runtime
579+
'savefig.format' : ['png', update_savefig_format], # value checked by backend at runtime
571580
'savefig.bbox' : [None, validate_bbox], # options are 'tight', or 'standard'. 'standard' validates to None.
572581
'savefig.pad_inches' : [0.1, validate_float],
573582

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.