Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Added figsize and layout getters and setters for Figure.__init__#29632

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
alexjvd4 wants to merge1 commit intomatplotlib:main
base:main
Choose a base branch
Loading
fromalexjvd4:Open-source-Contribution
Open
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletionslib/matplotlib/figure.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
"""
`matplotlib.figure` implements the following classes:

Expand DownExpand Up@@ -2644,6 +2644,18 @@
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])

Check warning on line 2648 in lib/matplotlib/figure.py

View check run for this annotation

Codecov/ codecov/patch

lib/matplotlib/figure.py#L2648

Added line #L2648 was not covered by tests

def get_figsize(self):
return self.get_size_inches()

Check warning on line 2651 in lib/matplotlib/figure.py

View check run for this annotation

Codecov/ codecov/patch

lib/matplotlib/figure.py#L2651

Added line #L2651 was not covered by tests

def set_layout(self, layout_params):
self.set_layout_engine(layout_params)

Check warning on line 2654 in lib/matplotlib/figure.py

View check run for this annotation

Codecov/ codecov/patch

lib/matplotlib/figure.py#L2654

Added line #L2654 was not covered by tests

def get_layout(self):
return self.get_layout_engine()

Check warning on line 2657 in lib/matplotlib/figure.py

View check run for this annotation

Codecov/ codecov/patch

lib/matplotlib/figure.py#L2657

Added line #L2657 was not covered by tests

def pick(self, mouseevent):
if not self.canvas.widgetlock.locked():
super().pick(mouseevent)
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp