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: Set the position of the spine.
  
  Spine position is specified by a 2 tuple of (position type,
  amount). The position types are:
  
  * 'outward': place the spine out from the data area by the specified
    number of points. (Negative values place the spine inwards.)
  * 'axes': place the spine at the specified Axes coordinate (0 to 1).
  * 'data': place the spine at the specified data coordinate.
  
  Additionally, shorthand notations define a special positions:
  
  * 'center' -> ``('axes', 0.5)``
  * 'zero' -> ``('data', 0.0)``
  
  Examples
  --------
  :doc:`/gallery/spines/spine_placement_demo`
docstr_tok: ["Set","the","position","of","the","spine",".","Spine","position","is","specified","by","a","2","tuple","of","(","position","type",",","amount",")",".","The","position","types","are",":","*","'outward","'",":","place","the","spine","out","from","the","data","area","by","the","specified","number","of","points",".","(","Negative","values","place","the","spine","inwards",".",")","*","'axes","'",":","place","the","spine","at","the","specified","Axes","coordinate","(","0","to","1",")",".","*","'data","'",":","place","the","spine","at","the","specified","data","coordinate",".","Additionally",",","shorthand","notations","define","a","special","positions",":","*","'center","'","-",">","``","(","'axes","'",",","0.5",")","``","*","'zero","'","-",">","``","(","'data","'",",","0.0",")","``","Examples","--","--","--","--",":","doc",":","`","\/gallery\/spines\/spine_placement_demo","`"]
code: def set_position(self, position):
      """
      Set the position of the spine.
  
      Spine position is specified by a 2 tuple of (position type,
      amount). The position types are:
  
      * 'outward': place the spine out from the data area by the specified
        number of points. (Negative values place the spine inwards.)
      * 'axes': place the spine at the specified Axes coordinate (0 to 1).
      * 'data': place the spine at the specified data coordinate.
  
      Additionally, shorthand notations define a special positions:
  
      * 'center' -> ``('axes', 0.5)``
      * 'zero' -> ``('data', 0.0)``
  
      Examples
      --------
      :doc:`/gallery/spines/spine_placement_demo`
      """
      if position in ("center", "zero"):  # special positions
          pass
      else:
          if len(position) != 2:
              raise ValueError("position should be 'center' or 2-tuple")
          if position[0] not in ["outward", "axes", "data"]:
              raise ValueError(
                  "position[0] should be one of 'outward', "
                  "'axes', or 'data' "
              )
      self._position = position
      self.set_transform(self.get_spine_transform())
      if self.axis is not None:
          self.axis.reset_ticks()
      self.stale = True
  
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 16 for calling the Spine obj's underlying member method code with example usage: obj.set_position(position) without return types