class_docstr: General class to hold a Secondary_X/Yaxis.
class_docstr_tok: ["General","class","to","hold","a","Secondary_X\/Yaxis","."]
docstr: Set the vertical or horizontal location of the axes in
  parent-normalized coordinates.
  
  Parameters
  ----------
  location : {'top', 'bottom', 'left', 'right'} or float
      The position to put the secondary axis.  Strings can be 'top' or
      'bottom' for orientation='x' and 'right' or 'left' for
      orientation='y'. A float indicates the relative position on the
      parent Axes to put the new Axes, 0.0 being the bottom (or left)
      and 1.0 being the top (or right).
docstr_tok: ["Set","the","vertical","or","horizontal","location","of","the","axes","in","parent-normalized","coordinates",".","Parameters","--","--","--","--","--","location",":","{","'top","'",",","'bottom","'",",","'left","'",",","'right","'","}","or","float","The","position","to","put","the","secondary","axis",".","Strings","can","be","'top","'","or","'bottom","'","for","orientation=","'","x","'","and","'right","'","or","'left","'","for","orientation=","'","y","'",".","A","float","indicates","the","relative","position","on","the","parent","Axes","to","put","the","new","Axes",",","0.0","being","the","bottom","(","or","left",")","and","1.0","being","the","top","(","or","right",")","."]
code: def set_location(self, location):
      """
      Set the vertical or horizontal location of the axes in
      parent-normalized coordinates.
  
      Parameters
      ----------
      location : {'top', 'bottom', 'left', 'right'} or float
          The position to put the secondary axis.  Strings can be 'top' or
          'bottom' for orientation='x' and 'right' or 'left' for
          orientation='y'. A float indicates the relative position on the
          parent Axes to put the new Axes, 0.0 being the bottom (or left)
          and 1.0 being the top (or right).
      """
  
      # This puts the rectangle into figure-relative coordinates.
      if isinstance(location, str):
          _api.check_in_list(self._locstrings, location=location)
          self._pos = 1.0 if location in ("top", "right") else 0.0
      elif isinstance(location, numbers.Real):
          self._pos = location
      else:
          raise ValueError(
              f"location must be {self._locstrings[0]!r}, "
              f"{self._locstrings[1]!r}, or a float, not {location!r}"
          )
  
      self._loc = location
  
      if self._orientation == "x":
          # An x-secondary axes is like an inset axes from x = 0 to x = 1 and
          # from y = pos to y = pos + eps, in the parent's transAxes coords.
          bounds = [0, self._pos, 1.0, 1e-10]
      else:  # 'y'
          bounds = [self._pos, 0, 1e-10, 1]
  
      # this locator lets the axes move in the parent axes coordinates.
      # so it never needs to know where the parent is explicitly in
      # figure coordinates.
      # it gets called in ax.apply_aspect() (of all places)
      self.set_axes_locator(
          _TransformedBoundsLocator(bounds, self._parent.transAxes)
      )
  
file_path: matplotlib/lib/matplotlib/axes/_secondary_axes.py
imports: import numbers
  import numpy
  from matplotlib import _api, _docstring
  import matplotlib.ticker
  from matplotlib.axes._base import _AxesBase, _TransformedBoundsLocator
  from matplotlib.axis import Axis
  from matplotlib.transforms import Transform
label_desc: Use image node_id 3 for calling the SecondaryAxis obj's underlying member method code with example usage: obj.set_location(location) without return types