parameters: (ax, axis)
docstring: Get limits that would be set by autoscale.
  
      This is a trimmed down  version of the function 'handle_single_axis'
      that is found within 'matplotlib.axes._base._AxesBase.autoscale_view'
docstring_summary: Get limits that would be set by autoscale.
docstring_tokens: Get limits that would be set by autoscale .
function: def get_autoscale_limits(ax, axis):
      """
      Get limits that would be set by autoscale.
  
      This is a trimmed down  version of the function 'handle_single_axis'
      that is found within 'matplotlib.axes._base._AxesBase.autoscale_view'
      """
      axis_min, axis_max = getattr(ax.dataLim, 'interval{}'.format(axis))
      ax_margin = getattr(ax, '_{}margin'.format(axis))
      if ax_margin > 0:
          padding = (axis_max - axis_min)*ax_margin
          return axis_min - padding, axis_max + padding
      if not ax._tight:
          locator = getattr(ax, '{}axis'.format(axis)).get_major_locator()
          return locator.view_limits(axis_min, axis_max)
function_tokens: def get_autoscale_limits ( ax , axis ) : axis_min , axis_max = getattr ( ax . dataLim , 'interval{}' . format ( axis ) ) ax_margin = getattr ( ax , '_{}margin' . format ( axis ) ) if ax_margin > 0 : padding = ( axis_max - axis_min ) * ax_margin return axis_min - padding , axis_max + padding if not ax . _tight : locator = getattr ( ax , '{}axis' . format ( axis ) ) . get_major_locator ( ) return locator . view_limits ( axis_min , axis_max )