Version 2.2.2
matplotlib

matplotlib.axis.YAxis.set_smart_bounds

YAxis.set_smart_bounds(value)

set the axis to have smart bounds