class_docstr: Scales data in range -pi/2 to pi/2 (-90 to 90 degrees) using
  the system used to scale latitudes in a Mercator__ projection.
  
  The scale function:
    ln(tan(y) + sec(y))
  
  The inverse scale function:
    atan(sinh(y))
  
  Since the Mercator scale tends to infinity at +/- 90 degrees,
  there is user-defined threshold, above and below which nothing
  will be plotted.  This defaults to +/- 85 degrees.
  
  __ https://en.wikipedia.org/wiki/Mercator_projection
docstr: Override to set up the locators and formatters to use with the
  scale.  This is only required if the scale requires custom
  locators and formatters.  Writing custom locators and
  formatters is rather outside the scope of this example, but
  there are many helpful examples in :mod:`.ticker`.
  
  In our case, the Mercator example uses a fixed locator from -90 to 90
  degrees and a custom formatter to convert the radians to degrees and
  put a degree symbol after the value.
docstr_tok: ["Override","to","set","up","the","locators","and","formatters","to","use","with","the","scale",".","This","is","only","required","if","the","scale","requires","custom","locators","and","formatters",".","Writing","custom","locators","and","formatters","is","rather","outside","the","scope","of","this","example",",","but","there","are","many","helpful","examples","in",":","mod",":","`",".ticker","`",".","In","our","case",",","the","Mercator","example","uses","a","fixed","locator","from","-90","to","90","degrees","and","a","custom","formatter","to","convert","the","radians","to","degrees","and","put","a","degree","symbol","after","the","value","."]
code: def set_default_locators_and_formatters(self, axis):
      """
      Override to set up the locators and formatters to use with the
      scale.  This is only required if the scale requires custom
      locators and formatters.  Writing custom locators and
      formatters is rather outside the scope of this example, but
      there are many helpful examples in :mod:`.ticker`.
  
      In our case, the Mercator example uses a fixed locator from -90 to 90
      degrees and a custom formatter to convert the radians to degrees and
      put a degree symbol after the value.
      """
      fmt = FuncFormatter(
          lambda x, pos=None: f"{np.degrees(x):.0f}\N{DEGREE SIGN}"
      )
      axis.set(
          major_locator=FixedLocator(np.radians(range(-90, 90, 10))),
          major_formatter=fmt,
          minor_formatter=fmt,
      )
  
file_path: matplotlib/galleries/examples/scales/custom_scale.py
imports: import numpy
  from numpy import ma
  from matplotlib import scale
  from matplotlib import transforms
  from matplotlib.ticker import FixedLocator, FuncFormatter
label_desc: Use image node_id 3 for calling the MercatorLatitudeScale obj's underlying member method code with example usage: obj.set_default_locators_and_formatters(axis) without return types