Skip to content

Commit 8faef77

Browse files
committed
Restore get_renderer function in deprecated tight_layout
1 parent 54360f3 commit 8faef77

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

lib/matplotlib/tight_layout.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
11
from matplotlib._tight_layout import * # noqa: F401, F403
22
from matplotlib import _api
33
_api.warn_deprecated("3.6", name=__name__, obj_type="module")
4+
5+
6+
@_api.deprecated("3.6", alternative="figure.canvas.get_renderer()")
7+
def get_renderer(fig):
8+
canvas = fig.canvas
9+
if canvas and hasattr(canvas, "get_renderer"):
10+
return canvas.get_renderer()
11+
else:
12+
from . import backend_bases
13+
return backend_bases._get_renderer(fig)

0 commit comments

Comments
 (0)
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