Skip to content

Commit

Permalink
Backport PR #25193: Fix displacement of colorbar for eps with bbox_in…
Browse files Browse the repository at this point in the history
…ches='tight'
  • Loading branch information
anntzer authored and meeseeksmachine committed Feb 11, 2023
1 parent fc775b1 commit 3e0e0b3
Show file tree
Hide file tree
Showing 3 changed files with 910 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/matplotlib/backends/backend_ps.py
Expand Up @@ -825,7 +825,7 @@ def get_default_filetype(self):
def _print_ps(
self, fmt, outfile, *,
metadata=None, papertype=None, orientation='portrait',
**kwargs):
bbox_inches_restore=None, **kwargs):

dpi = self.figure.dpi
self.figure.dpi = 72 # Override the dpi kwarg
Expand Down Expand Up @@ -860,7 +860,8 @@ def _print_ps(
if mpl.rcParams['text.usetex'] else
self._print_figure)
printer(fmt, outfile, dpi=dpi, dsc_comments=dsc_comments,
orientation=orientation, papertype=papertype, **kwargs)
orientation=orientation, papertype=papertype,
bbox_inches_restore=bbox_inches_restore, **kwargs)

def _print_figure(
self, fmt, outfile, *,
Expand Down

0 comments on commit 3e0e0b3

Please sign in to comment.