MercatorLatitudeScale

class MercatorLatitudeScale(thresh=85.0)[source]

Bases: _Scale, ScaleBase

Axis scale that is linear in the Mercator projection latitude. Adapted from this example. The scale function is as follows:

\[y = \ln(\tan(\pi x \,/\, 180) + \sec(\pi x \,/\, 180))\]

The inverse scale function is as follows:

\[x = 180\,\arctan(\sinh(y)) \,/\, \pi\]
Parameters

thresh (float, optional) – Threshold between 0 and 90, used to constrain axis limits between -thresh and +thresh.

Methods Summary

limit_range_for_scale(vmin, vmax, minpos)

Return the range vmin and vmax limited to within +/-90 degrees (exclusive).