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

FIX: maybe improve renderer dance by jklymak · Pull Request #22732 · matplotlib/matplotlib · GitHub

Repository navigation

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (2) 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
4 changes: 2 additions & 2 deletions lib/matplotlib/_constrained_layout.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 @@ -18,7 +18,7 @@
import numpy as np

from matplotlib import _api, artist as martist
from matplotlib.backend_bases import _get_renderer
from matplotlib._tight_layout import get_renderer
import matplotlib.transforms as mtransforms
import matplotlib._layoutgrid as mlayoutgrid

Expand Down Expand Up @@ -92,7 +92,7 @@ def do_constrained_layout(fig, h_pad, w_pad,
layoutgrid : private debugging structure
"""

renderer = _get_renderer(fig)
renderer = get_renderer(fig)
# make layoutgrid tree...
layoutgrids = make_layoutgrids(fig, None)
if not layoutgrids['hasgrids']:
Expand Down
5 changes: 3 additions & 2 deletions lib/matplotlib/layout_engine.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 @@ -22,7 +22,8 @@
from matplotlib._constrained_layout import do_constrained_layout
from matplotlib._tight_layout import (get_subplotspec_list,
get_tight_layout_figure)
from matplotlib.backend_bases import _get_renderer
# from matplotlib.backend_bases import _get_renderer
from matplotlib._tight_layout import get_renderer


class LayoutEngine:
Expand Down Expand Up @@ -153,7 +154,7 @@ def execute(self, fig):
_api.warn_external("This figure includes Axes that are not "
"compatible with tight_layout, so results "
"might be incorrect.")
renderer = _get_renderer(fig)
renderer = get_renderer(fig)
with getattr(renderer, "_draw_disabled", nullcontext)():
kwargs = get_tight_layout_figure(
fig, fig.axes, subplotspec_list, renderer,
Expand Down

Back | FazBrowse Home | New Git URL