From 36974e4afe072672f48f3b72b00b402457e4df62 Mon Sep 17 00:00:00 2001 From: alexj Date: Sun, 16 Feb 2025 19:59:06 -0500 Subject: [PATCH] Added figsize and layout getters and setters for Figure.__init__ --- lib/matplotlib/figure.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/matplotlib/figure.py b/lib/matplotlib/figure.py index 76b2df563ade..6e6f8197c1bc 100644 --- a/lib/matplotlib/figure.py +++ b/lib/matplotlib/figure.py @@ -2644,6 +2644,18 @@ def __init__(self, self._axstack = _AxesStack() # track all figure Axes and current Axes self.clear() + def set_figsize(self, fig_size_params): + self.set_size_inches(fig_size_params[0], fig_size_params[1]) + + def get_figsize(self): + return self.get_size_inches() + + def set_layout(self, layout_params): + self.set_layout_engine(layout_params) + + def get_layout(self): + return self.get_layout_engine() + def pick(self, mouseevent): if not self.canvas.widgetlock.locked(): super().pick(mouseevent) 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