From bda8790ca124916af31057145f4154e91a89c841 Mon Sep 17 00:00:00 2001 From: Jody Klymak Date: Wed, 30 Mar 2022 16:56:09 +0200 Subject: [PATCH] FIX: maybe improve renderer dance --- lib/matplotlib/_constrained_layout.py | 4 ++-- lib/matplotlib/layout_engine.py | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/matplotlib/_constrained_layout.py b/lib/matplotlib/_constrained_layout.py index 5896fdda1680..891b1ca8b065 100644 --- a/lib/matplotlib/_constrained_layout.py +++ b/lib/matplotlib/_constrained_layout.py @@ -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 @@ -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']: diff --git a/lib/matplotlib/layout_engine.py b/lib/matplotlib/layout_engine.py index d6e695fe3881..aeaf44923d66 100644 --- a/lib/matplotlib/layout_engine.py +++ b/lib/matplotlib/layout_engine.py @@ -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: @@ -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, pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy