class_docstr: General class to hold a Secondary_X/Yaxis.
class_docstr_tok: ["General","class","to","hold","a","Secondary_X\/Yaxis","."]
docstr: Set if axes spine and labels are drawn at top or bottom (or left/right)
  of the Axes.
  
  Parameters
  ----------
  align : {'top', 'bottom', 'left', 'right'}
      Either 'top' or 'bottom' for orientation='x' or
      'left' or 'right' for orientation='y' axis.
docstr_tok: ["Set","if","axes","spine","and","labels","are","drawn","at","top","or","bottom","(","or","left\/right",")","of","the","Axes",".","Parameters","--","--","--","--","--","align",":","{","'top","'",",","'bottom","'",",","'left","'",",","'right","'","}","Either","'top","'","or","'bottom","'","for","orientation=","'","x","'","or","'left","'","or","'right","'","for","orientation=","'","y","'","axis","."]
code: def set_alignment(self, align):
      """
      Set if axes spine and labels are drawn at top or bottom (or left/right)
      of the Axes.
  
      Parameters
      ----------
      align : {'top', 'bottom', 'left', 'right'}
          Either 'top' or 'bottom' for orientation='x' or
          'left' or 'right' for orientation='y' axis.
      """
      _api.check_in_list(self._locstrings, align=align)
      if (
          align == self._locstrings[1]
      ):  # Need to change the orientation.
          self._locstrings = self._locstrings[::-1]
      self.spines[self._locstrings[0]].set_visible(True)
      self.spines[self._locstrings[1]].set_visible(False)
      self._axis.set_ticks_position(align)
      self._axis.set_label_position(align)
  
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 2 for calling the SecondaryAxis obj's underlying member method code with example usage: obj.set_alignment(align) without return types