There was an error while loading. Please reload this page.
2 parents af6828c + ed70897 commit a0245ffCopy full SHA for a0245ff
2 files changed
lib/matplotlib/backend_bases.py
@@ -2123,6 +2123,12 @@ def print_figure(
2123
if dpi == 'figure':
2124
dpi = getattr(self.figure, '_original_dpi', self.figure.dpi)
2125
2126
+ if kwargs.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
+
2132
# Remove the figure manager, if any, to avoid resizing the GUI widget.
2133
with cbook._setattr_cm(self, manager=None), \
2134
self._switch_canvas_and_return_print_method(format, backend) \
lib/matplotlib/backends/backend_ps.py
@@ -872,9 +872,6 @@ def _print_figure(
872
# find the appropriate papertype
873
width, height = self.figure.get_size_inches()
874
if papertype == '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.")
878
papertype = _get_papertype(*orientation.swap_if_landscape((width, height)))
879
880
if is_eps or papertype == 'figure':
@@ -1058,9 +1055,6 @@ def _print_figure_tex(
1058
1055
self.figure.get_size_inches())
1059
1056
else:
1060
1057
1061
1062
- addendum="Pass an explicit paper type, or "
1063
1064
papertype = _get_papertype(width, height)
1065
paper_width, paper_height = papersize[papertype]
1066
0 commit comments