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

Skip to content

Commit 613b343

Browse files
committed
Fix displacement of colorbar for eps with bbox_inches='tight'
Co-authored-by: Antony Lee <[email protected]> Closes #25176
1 parent 573292d commit 613b343

File tree

3 files changed

+1370
-2
lines changed

3 files changed

+1370
-2
lines changed

lib/matplotlib/backends/backend_ps.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -825,7 +825,7 @@ def get_default_filetype(self):
825825
def _print_ps(
826826
self, fmt, outfile, *,
827827
metadata=None, papertype=None, orientation='portrait',
828-
**kwargs):
828+
bbox_inches_restore=None, **kwargs):
829829

830830
dpi = self.figure.dpi
831831
self.figure.dpi = 72 # Override the dpi kwarg
@@ -860,7 +860,8 @@ def _print_ps(
860860
if mpl.rcParams['text.usetex'] else
861861
self._print_figure)
862862
printer(fmt, outfile, dpi=dpi, dsc_comments=dsc_comments,
863-
orientation=orientation, papertype=papertype, **kwargs)
863+
orientation=orientation, papertype=papertype,
864+
bbox_inches_restore=bbox_inches_restore, **kwargs)
864865

865866
def _print_figure(
866867
self, fmt, outfile, *,

0 commit comments

Comments
 (0)