@avoid_circular
def _adjust_limits_aspect(self, *args, **kwargs):
    '\n        Adjust the limits of the visualization to take into account the aspect\n        ratio. This only works if `_set_axes_aspect_ratio` has been called\n        previously.\n        '
    if ((self.aspect == 'auto') or (self._axes_aspect_ratio is None)):
        return
    if ((self.x_min is None) or (self.x_max is None) or (self.y_min is None) or (self.y_max is None)):
        return
    aspect_adjustable = kwargs.pop('aspect_adjustable', 'auto')
    changed = None
    axes_ratio = self._axes_aspect_ratio
    (x_min, x_max) = (self.x_min, self.x_max)
    (y_min, y_max) = (self.y_min, self.y_max)
    data_ratio = (abs((y_max - y_min)) / abs((x_max - x_min)))
    if ((abs((data_ratio - axes_ratio)) / (0.5 * (data_ratio + axes_ratio))) > 0.01):
        if (aspect_adjustable == 'both'):
            x_mid = (0.5 * (x_min + x_max))
            x_width = (abs((x_max - x_min)) * ((data_ratio / axes_ratio) ** 0.5))
            y_mid = (0.5 * (y_min + y_max))
            y_width = (abs((y_max - y_min)) / ((data_ratio / axes_ratio) ** 0.5))
            x_min = (x_mid - (x_width / 2.0))
            x_max = (x_mid + (x_width / 2.0))
            y_min = (y_mid - (y_width / 2.0))
            y_max = (y_mid + (y_width / 2.0))
        elif (((aspect_adjustable == 'auto') and (data_ratio > axes_ratio)) or (aspect_adjustable == 'x')):
            x_mid = (0.5 * (x_min + x_max))
            x_width = (abs((y_max - y_min)) / axes_ratio)
            x_min = (x_mid - (x_width / 2.0))
            x_max = (x_mid + (x_width / 2.0))
        else:
            y_mid = (0.5 * (y_min + y_max))
            y_width = (abs((x_max - x_min)) * axes_ratio)
            y_min = (y_mid - (y_width / 2.0))
            y_max = (y_mid + (y_width / 2.0))
        with delay_callback(self, 'x_min', 'x_max', 'y_min', 'y_max'):
            self.x_min = x_min
            self.x_max = x_max
            self.y_min = y_min
            self.y_max = y_max
Adjust the limits of the visualization to take into account the aspect
ratio. This only works if `_set_axes_aspect_ratio` has been called
previously.
@avoid_circular
def _adjust_limits_aspect(self, *args, **kwargs):
    '\n        Adjust the limits of the visualization to take into account the aspect\n        ratio. This only works if `_set_axes_aspect_ratio` has been called\n        previously.\n        '
    if ((self.aspect == 'auto') or (self._axes_aspect_ratio is None)):
        return
    if ((self.x_min is None) or (self.x_max is None) or (self.y_min is None) or (self.y_max is None)):
        return
    aspect_adjustable = kwargs.pop('aspect_adjustable', 'auto')
    changed = None
    axes_ratio = self._axes_aspect_ratio
    (x_min, x_max) = (self.x_min, self.x_max)
    (y_min, y_max) = (self.y_min, self.y_max)
    data_ratio = (abs((y_max - y_min)) / abs((x_max - x_min)))
    if ((abs((data_ratio - axes_ratio)) / (0.5 * (data_ratio + axes_ratio))) > 0.01):
        if (aspect_adjustable == 'both'):
            x_mid = (0.5 * (x_min + x_max))
            x_width = (abs((x_max - x_min)) * ((data_ratio / axes_ratio) ** 0.5))
            y_mid = (0.5 * (y_min + y_max))
            y_width = (abs((y_max - y_min)) / ((data_ratio / axes_ratio) ** 0.5))
            x_min = (x_mid - (x_width / 2.0))
            x_max = (x_mid + (x_width / 2.0))
            y_min = (y_mid - (y_width / 2.0))
            y_max = (y_mid + (y_width / 2.0))
        elif (((aspect_adjustable == 'auto') and (data_ratio > axes_ratio)) or (aspect_adjustable == 'x')):
            x_mid = (0.5 * (x_min + x_max))
            x_width = (abs((y_max - y_min)) / axes_ratio)
            x_min = (x_mid - (x_width / 2.0))
            x_max = (x_mid + (x_width / 2.0))
        else:
            y_mid = (0.5 * (y_min + y_max))
            y_width = (abs((x_max - x_min)) * axes_ratio)
            y_min = (y_mid - (y_width / 2.0))
            y_max = (y_mid + (y_width / 2.0))
        with delay_callback(self, 'x_min', 'x_max', 'y_min', 'y_max'):
            self.x_min = x_min
            self.x_max = x_max
            self.y_min = y_min
            self.y_max = y_max