Scale

Scale(scale, *args, **kwargs)[source]

Returns a ScaleBase instance, used to interpret the xscale, xscale_kw, yscale, and yscale_kw arguments when passed to format.

Parameters
  • scale (ScaleBase, str, (str, …), or class) – If ScaleBase, the object is returned.

    If string, this is the registered scale name or scale “preset” (see below table). If an iterable is passed with the scale name as the first element, the subsequent items are passed to the scale class as positional arguments.

    Key

    Class

    Description

    'linear'

    LinearScale

    Linear

    'log'

    LogScale

    Logarithmic

    'symlog'

    SymmetricalLogScale

    Logarithmic beyond finite space around zero

    'logit'

    LogitScale

    Logistic

    'inverse'

    InverseScale

    Inverse

    'function'

    FuncScale

    Scale from arbitrary forward and backwards functions

    'sine'

    SineLatitudeScale

    Sine function (in degrees)

    'mercator'

    MercatorLatitudeScale

    Mercator latitude function (in degrees)

    'exp'

    ExpScale

    Arbitrary exponential function

    'power'

    PowerScale

    Arbitrary power function

    'cutoff'

    CutoffScale

    Arbitrary linear transformations

    'quadratic'

    PowerScale (preset)

    Quadratic function

    'cubic'

    PowerScale (preset)

    Cubic function

    'quartic'

    PowerScale (preset)

    Cubic function

    'pressure'

    ExpScale (preset)

    Height (in km) expressed linear in pressure

    'height'

    ExpScale (preset)

    Pressure (in hPa) expressed linear in height

    'db'

    ExpScale (preset)

    Ratio expressed as decibels

    'np'

    ExpScale (preset)

    Ratio expressed as nepers

    'idb'

    ExpScale (preset)

    Decibels expressed as ratio

    'inp'

    ExpScale (preset)

    Nepers expressed as ratio

  • *args, **kwargs – Passed to the ScaleBase class.

Returns

ScaleBase – The scale instance.