There was an error while loading. Please reload this page.
2 parents 2cb8c6a + 0334c94 commit 464f39bCopy full SHA for 464f39b
2 files changed
lib/matplotlib/backend_bases.py
@@ -2105,6 +2105,12 @@ def print_figure(
2105
if dpi == 'figure':
2106
dpi = getattr(self.figure, '_original_dpi', self.figure.dpi)
2107
2108
+ if kwargs.get("papertype") == 'auto':
2109
+ # When deprecation elapses, remove backend_ps._get_papertype & its callers.
2110
+ _api.warn_deprecated(
2111
+ "3.8", name="papertype='auto'", addendum="Pass an explicit paper type, "
2112
+ "'figure', or omit the *papertype* argument entirely.")
2113
+
2114
# Remove the figure manager, if any, to avoid resizing the GUI widget.
2115
with cbook._setattr_cm(self, manager=None), \
2116
self._switch_canvas_and_return_print_method(format, backend) \
lib/matplotlib/backends/backend_ps.py
@@ -867,9 +867,6 @@ def _print_figure(
867
# find the appropriate papertype
868
width, height = self.figure.get_size_inches()
869
if papertype == 'auto':
870
- _api.warn_deprecated("3.8", name="papertype='auto'",
871
- addendum="Pass an explicit paper type, 'figure', or "
872
- "omit the *papertype* argument entirely.")
873
papertype = _get_papertype(*orientation.swap_if_landscape((width, height)))
874
875
if is_eps or papertype == 'figure':
@@ -1053,9 +1050,6 @@ def _print_figure_tex(
1053
1050
self.figure.get_size_inches())
1054
1051
else:
1055
1052
1056
1057
- addendum="Pass an explicit paper type, or "
1058
1059
papertype = _get_papertype(width, height)
1060
paper_width, paper_height = papersize[papertype]
1061
0 commit comments