FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Backport PR #22732: FIX: maybe improve renderer dance by tacaswell · Pull Request #22783 · matplotlib/matplotlib · GitHub

Repository navigation

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
8 changes: 4 additions & 4 deletions lib/matplotlib/figure.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -3144,7 +3144,7 @@ def execute_constrained_layout(self, renderer=None):
-------
layoutgrid : private debugging object
"""

from matplotlib.tight_layout import get_renderer
from matplotlib._constrained_layout import do_constrained_layout

_log.debug('Executing constrainedlayout')
Expand All @@ -3155,7 +3155,7 @@ def execute_constrained_layout(self, renderer=None):
w_pad = w_pad / width
h_pad = h_pad / height
if renderer is None:
renderer = _get_renderer(fig)
renderer = get_renderer(fig)
return do_constrained_layout(fig, renderer, h_pad, w_pad,
hspace, wspace)

Expand Down Expand Up @@ -3186,13 +3186,13 @@ def tight_layout(self, *, pad=1.08, h_pad=None, w_pad=None, rect=None):
"""
from contextlib import nullcontext
from .tight_layout import (
get_subplotspec_list, get_tight_layout_figure)
get_subplotspec_list, get_tight_layout_figure, get_renderer)
subplotspec_list = get_subplotspec_list(self.axes)
if None in subplotspec_list:
_api.warn_external("This figure includes Axes that are not "
"compatible with tight_layout, so results "
"might be incorrect.")
renderer = _get_renderer(self)
renderer = get_renderer(self)
with getattr(renderer, "_draw_disabled", nullcontext)():
kwargs = get_tight_layout_figure(
self, self.axes, subplotspec_list, renderer,
Expand Down

Back | FazBrowse Home | New Git URL