class_docstr: An axis spine -- the line noting the data area boundaries.
  
  Spines are the lines connecting the axis tick marks and noting the
  boundaries of the data area. They can be placed at arbitrary
  positions. See `~.Spine.set_position` for more information.
  
  The default position is ``('outward', 0)``.
  
  Spines are subclasses of `.Patch`, and inherit much of their behavior.
  
  Spines draw a line, a circle, or an arc depending on if
  `~.Spine.set_patch_line`, `~.Spine.set_patch_circle`, or
  `~.Spine.set_patch_arc` has been called. Line-like is the default.
  
  For examples see :ref:`spines_examples`.
class_docstr_tok: ["An","axis","spine","--","the","line","noting","the","data","area","boundaries",".","Spines","are","the","lines","connecting","the","axis","tick","marks","and","noting","the","boundaries","of","the","data","area",".","They","can","be","placed","at","arbitrary","positions",".","See","`","~.Spine.set_position","`","for","more","information",".","The","default","position","is","``","(","'outward","'",",","0",")","``",".","Spines","are","subclasses","of","`",".Patch","`",",","and","inherit","much","of","their","behavior",".","Spines","draw","a","line",",","a","circle",",","or","an","arc","depending","on","if","`","~.Spine.set_patch_line","`",",","`","~.Spine.set_patch_circle","`",",","or","`","~.Spine.set_patch_arc","`","has","been","called",".","Line-like","is","the","default",".","For","examples","see",":","ref",":","`","spines_examples","`","."]
docstr: Automatically set spine bounds to the view interval.
docstr_tok: ["Automatically","set","spine","bounds","to","the","view","interval","."]
code: def _adjust_location(self):
      """Automatically set spine bounds to the view interval."""
  
      if self.spine_type == "circle":
          return
  
      if self._bounds is not None:
          low, high = self._bounds
      elif self.spine_type in ("left", "right"):
          low, high = self.axes.viewLim.intervaly
      elif self.spine_type in ("top", "bottom"):
          low, high = self.axes.viewLim.intervalx
      else:
          raise ValueError(
              f"unknown spine spine_type: {self.spine_type}"
          )
  
      if self._patch_type == "arc":
          if self.spine_type in ("bottom", "top"):
              try:
                  direction = self.axes.get_theta_direction()
              except AttributeError:
                  direction = 1
              try:
                  offset = self.axes.get_theta_offset()
              except AttributeError:
                  offset = 0
              low = low * direction + offset
              high = high * direction + offset
              if low > high:
                  low, high = high, low
  
              self._path = mpath.Path.arc(
                  np.rad2deg(low), np.rad2deg(high)
              )
  
              if self.spine_type == "bottom":
                  rmin, rmax = self.axes.viewLim.intervaly
                  try:
                      rorigin = self.axes.get_rorigin()
                  except AttributeError:
                      rorigin = rmin
                  scaled_diameter = (rmin - rorigin) / (rmax - rorigin)
                  self._height = scaled_diameter
                  self._width = scaled_diameter
  
          else:
              raise ValueError(
                  'unable to set bounds for spine "%s"'
                  % self.spine_type
              )
      else:
          v1 = self._path.vertices
          assert v1.shape == (2, 2), "unexpected vertices shape"
          if self.spine_type in ["left", "right"]:
              v1[0, 1] = low
              v1[1, 1] = high
          elif self.spine_type in ["bottom", "top"]:
              v1[0, 0] = low
              v1[1, 0] = high
          else:
              raise ValueError(
                  'unable to set bounds for spine "%s"'
                  % self.spine_type
              )
  
imports: from collections.abc import MutableMapping
  import functools
  import numpy
  import matplotlib
  from matplotlib import _api, _docstring
  from matplotlib.artist import allow_rasterization
  import matplotlib.transforms
  import matplotlib.patches
  import matplotlib.path
label_desc: Use image node_id 14 for calling the Spine obj's underlying member method code with example usage: obj._adjust_location() without return types