@@ -872,18 +872,24 @@ def _print_figure(
872872 # find the appropriate papertype
873873 width , height = self .figure .get_size_inches ()
874874 if papertype == 'auto' :
875- papertype = _get_papertype (
876- * orientation . swap_if_landscape (( width , height )))
877- paper_width , paper_height = orientation . swap_if_landscape (
878- papersize [ papertype ] )
875+ _api . warn_deprecated ( "3.8" , name = "papertype='auto'" ,
876+ addendum = "Pass an explicit paper type, or omit the "
877+ "*papertype* argument entirely." )
878+ papertype = _get_papertype ( * orientation . swap_if_landscape (( width , height )) )
879879
880- if mpl .rcParams ['ps.usedistiller' ]:
881- # distillers improperly clip eps files if pagesize is too small
882- if width > paper_width or height > paper_height :
883- papertype = _get_papertype (
884- * orientation .swap_if_landscape ((width , height )))
885- paper_width , paper_height = orientation .swap_if_landscape (
886- papersize [papertype ])
880+ if is_eps :
881+ paper_width , paper_height = width , height
882+ else :
883+ paper_width , paper_height = orientation .swap_if_landscape (
884+ papersize [papertype ])
885+
886+ if mpl .rcParams ['ps.usedistiller' ]:
887+ # distillers improperly clip eps files if pagesize is too small
888+ if width > paper_width or height > paper_height :
889+ papertype = _get_papertype (
890+ * orientation .swap_if_landscape ((width , height )))
891+ paper_width , paper_height = orientation .swap_if_landscape (
892+ papersize [papertype ])
887893
888894 # center the figure on the paper
889895 xo = 72 * 0.5 * (paper_width - width )
@@ -1060,6 +1066,9 @@ def _print_figure_tex(
10601066 self .figure .get_size_inches ())
10611067 else :
10621068 if papertype == 'auto' :
1069+ _api .warn_deprecated ("3.8" , name = "papertype='auto'" ,
1070+ addendum = "Pass an explicit paper type, or "
1071+ "omit the *papertype* argument entirely." )
10631072 papertype = _get_papertype (width , height )
10641073 paper_width , paper_height = papersize [papertype ]
10651074
0 commit comments