Version 3.1.2
matplotlib

matplotlib.axis.YAxis.limit_range_for_scale

YAxis.limit_range_for_scale(vmin, vmax)