class_docstr: General class to hold a Secondary_X/Yaxis.
class_docstr_tok: ["General","class","to","hold","a","Secondary_X\/Yaxis","."]
docstr: Check if parent has set its scale
docstr_tok: ["Check","if","parent","has","set","its","scale"]
code: def _set_scale(self):
      """
      Check if parent has set its scale
      """
  
      if self._orientation == "x":
          pscale = self._parent.xaxis.get_scale()
          set_scale = self.set_xscale
      else:  # 'y'
          pscale = self._parent.yaxis.get_scale()
          set_scale = self.set_yscale
      if pscale == self._parentscale:
          return
  
      if self._ticks_set:
          ticks = self._axis.get_ticklocs()
  
      # need to invert the roles here for the ticks to line up.
      set_scale(
          "functionlog" if pscale == "log" else "function",
          functions=self._functions[::-1],
      )
  
      # OK, set_scale sets the locators, but if we've called
      # axsecond.set_ticks, we want to keep those.
      if self._ticks_set:
          self._axis.set_major_locator(mticker.FixedLocator(ticks))
  
      # If the parent scale doesn't change, we can skip this next time.
      self._parentscale = pscale
  
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 8 for calling the SecondaryAxis obj's underlying member method code with example usage: obj._set_scale() without return types