class_docstr: General class to hold a Secondary_X/Yaxis.
class_docstr_tok: ["General","class","to","hold","a","Secondary_X\/Yaxis","."]
docstr: See `.secondary_xaxis` and `.secondary_yaxis` for the doc string.
  While there is no need for this to be private, it should really be
  called by those higher level functions.
docstr_tok: ["See","`",".secondary_xaxis","`","and","`",".secondary_yaxis","`","for","the","doc","string",".","While","there","is","no","need","for","this","to","be","private",",","it","should","really","be","called","by","those","higher","level","functions","."]
code: def __init__(
      self, parent, orientation, location, functions, **kwargs
  ):
      """
      See `.secondary_xaxis` and `.secondary_yaxis` for the doc string.
      While there is no need for this to be private, it should really be
      called by those higher level functions.
      """
      _api.check_in_list(["x", "y"], orientation=orientation)
      self._functions = functions
      self._parent = parent
      self._orientation = orientation
      self._ticks_set = False
  
      if self._orientation == "x":
          super().__init__(
              self._parent.figure, [0, 1.0, 1, 0.0001], **kwargs
          )
          self._axis = self.xaxis
          self._locstrings = ["top", "bottom"]
          self._otherstrings = ["left", "right"]
      else:  # 'y'
          super().__init__(
              self._parent.figure, [0, 1.0, 0.0001, 1], **kwargs
          )
          self._axis = self.yaxis
          self._locstrings = ["right", "left"]
          self._otherstrings = ["top", "bottom"]
      self._parentscale = None
      # this gets positioned w/o constrained_layout so exclude:
  
      self.set_location(location)
      self.set_functions(functions)
  
      # styling:
      otheraxis = self.yaxis if self._orientation == "x" else self.xaxis
      otheraxis.set_major_locator(mticker.NullLocator())
      otheraxis.set_ticks_position("none")
  
      self.spines[self._otherstrings].set_visible(False)
      self.spines[self._locstrings].set_visible(True)
  
      if self._pos < 0.5:
          # flip the location strings...
          self._locstrings = self._locstrings[::-1]
      self.set_alignment(self._locstrings[0])
  
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 1 to create a new SecondaryAxis object from inherited base classes: _AxesBase with example: obj = SecondaryAxis(parent, orientation, location, functions)