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

Commita0245ff

Browse files
authored
Merge pull request#26979 from meeseeksmachine/auto-backport-of-pr-26959-on-v3.8.x
Backport PR#26959 on branch v3.8.x (Move papersize="auto" deprecation to backend_bases.)
2 parentsaf6828c +ed70897 commita0245ff

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

‎lib/matplotlib/backend_bases.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2123,6 +2123,12 @@ def print_figure(
21232123
ifdpi=='figure':
21242124
dpi=getattr(self.figure,'_original_dpi',self.figure.dpi)
21252125

2126+
ifkwargs.get("papertype")=='auto':
2127+
# When deprecation elapses, remove backend_ps._get_papertype & its callers.
2128+
_api.warn_deprecated(
2129+
"3.8",name="papertype='auto'",addendum="Pass an explicit paper type, "
2130+
"'figure', or omit the *papertype* argument entirely.")
2131+
21262132
# Remove the figure manager, if any, to avoid resizing the GUI widget.
21272133
withcbook._setattr_cm(self,manager=None), \
21282134
self._switch_canvas_and_return_print_method(format,backend) \

‎lib/matplotlib/backends/backend_ps.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -872,9 +872,6 @@ def _print_figure(
872872
# find the appropriate papertype
873873
width,height=self.figure.get_size_inches()
874874
ifpapertype=='auto':
875-
_api.warn_deprecated("3.8",name="papertype='auto'",
876-
addendum="Pass an explicit paper type, 'figure', or "
877-
"omit the *papertype* argument entirely.")
878875
papertype=_get_papertype(*orientation.swap_if_landscape((width,height)))
879876

880877
ifis_epsorpapertype=='figure':
@@ -1058,9 +1055,6 @@ def _print_figure_tex(
10581055
self.figure.get_size_inches())
10591056
else:
10601057
ifpapertype=='auto':
1061-
_api.warn_deprecated("3.8",name="papertype='auto'",
1062-
addendum="Pass an explicit paper type, or "
1063-
"omit the *papertype* argument entirely.")
10641058
papertype=_get_papertype(width,height)
10651059
paper_width,paper_height=papersize[papertype]
10661060

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp