@@ -230,6 +230,7 @@ def draw_quad_mesh(self, gc, master_transform, meshWidth, meshHeight,
230230 :meth:`draw_quad_mesh` that generates paths and then calls
231231 :meth:`draw_path_collection`.
232232 """
233+
233234 from matplotlib .collections import QuadMesh
234235 paths = QuadMesh .convert_mesh_to_paths (
235236 meshWidth , meshHeight , coordinates )
@@ -1977,11 +1978,11 @@ def print_figure(self, filename, dpi=None, facecolor='w', edgecolor='w',
19771978 *bbox_inches*
19781979 Bbox in inches. Only the given portion of the figure is
19791980 saved. If 'tight', try to figure out the tight bbox of
1980- the figure.
1981+ the figure. If None, use savefig.bbox
19811982
19821983 *pad_inches*
19831984 Amount of padding around the figure when bbox_inches is
1984- 'tight'.
1985+ 'tight'. If None, use savefig.pad_inches
19851986
19861987 *bbox_extra_artists*
19871988 A list of extra artists that will be considered when the
@@ -2003,6 +2004,7 @@ def print_figure(self, filename, dpi=None, facecolor='w', edgecolor='w',
20032004 if dpi is None :
20042005 dpi = rcParams ['savefig.dpi' ]
20052006
2007+
20062008 origDPI = self .figure .dpi
20072009 origfacecolor = self .figure .get_facecolor ()
20082010 origedgecolor = self .figure .get_edgecolor ()
@@ -2012,6 +2014,9 @@ def print_figure(self, filename, dpi=None, facecolor='w', edgecolor='w',
20122014 self .figure .set_edgecolor (edgecolor )
20132015
20142016 bbox_inches = kwargs .pop ("bbox_inches" , None )
2017+ if bbox_inches is None :
2018+ bbox_inches = rcParams ['savefig.bbox' ]
2019+
20152020
20162021 if bbox_inches :
20172022 # call adjust_bbox to save only the given area
@@ -2052,8 +2057,10 @@ def print_figure(self, filename, dpi=None, facecolor='w', edgecolor='w',
20522057
20532058 bbox_inches = Bbox .union ([bbox_inches , bbox_inches1 ])
20542059
2060+ pad = kwargs .pop ("pad_inches" , None )
2061+ if pad is None :
2062+ pad = rcParams ['savefig.pad_inches' ]
20552063
2056- pad = kwargs .pop ("pad_inches" , 0.1 )
20572064 bbox_inches = bbox_inches .padded (pad )
20582065
20592066 restore_bbox = tight_bbox .adjust_bbox (self .figure , format ,
0 commit comments