@@ -2078,7 +2078,7 @@ def _get_output_canvas(self, format):
2078
2078
'Supported formats: '
2079
2079
'%s.' % (format , ', ' .join (formats )))
2080
2080
2081
- def print_figure (self , filename , dpi = None , facecolor = 'w' , edgecolor = 'w' ,
2081
+ def print_figure (self , filename , dpi = None , facecolor = None , edgecolor = None ,
2082
2082
orientation = 'portrait' , format = None , ** kwargs ):
2083
2083
"""
2084
2084
Render the figure to hardcopy. Set the figure patch face and edge
@@ -2098,10 +2098,10 @@ def print_figure(self, filename, dpi=None, facecolor='w', edgecolor='w',
2098
2098
the dots per inch to save the figure in; if None, use savefig.dpi
2099
2099
2100
2100
*facecolor*
2101
- the facecolor of the figure
2101
+ the facecolor of the figure; if None, defaults to savefig.facecolor
2102
2102
2103
2103
*edgecolor*
2104
- the edgecolor of the figure
2104
+ the edgecolor of the figure; if None, defaults to savefig.edgecolor
2105
2105
2106
2106
*orientation*
2107
2107
landscape' | 'portrait' (not supported on all backends)
@@ -2141,9 +2141,15 @@ def print_figure(self, filename, dpi=None, facecolor='w', edgecolor='w',
2141
2141
2142
2142
if dpi is None :
2143
2143
dpi = rcParams ['savefig.dpi' ]
2144
+
2144
2145
if dpi == 'figure' :
2145
2146
dpi = self .figure .dpi
2146
2147
2148
+ if facecolor is None :
2149
+ facecolor = rcParams ['savefig.facecolor' ]
2150
+ if edgecolor is None :
2151
+ edgecolor = rcParams ['savefig.edgecolor' ]
2152
+
2147
2153
origDPI = self .figure .dpi
2148
2154
origfacecolor = self .figure .get_facecolor ()
2149
2155
origedgecolor = self .figure .get_edgecolor ()
0 commit comments