Scale

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

Return a ScaleBase instance.

Parameters

scale (ScaleBase, str, or tuple) – The axis scale specification. If a ScaleBase instance already, a copy.copy of the instance is returned. Otherwise, scale should be a string corresponding to one of the “registered” axis scales or axis scale presets (see below table).

If scale is a list or tuple and the first element is a “registered” scale name, subsequent elements 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

Arbitrary forward and backwards transformations

'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 piecewise linear transformations

'quadratic'

PowerScale (preset)

Quadratic function

'cubic'

PowerScale (preset)

Cubic function

'quartic'

PowerScale (preset)

Quartic function

'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

'pressure'

ExpScale (preset)

Height (in km) expressed linear in pressure

'height'

ExpScale (preset)

Pressure (in hPa) expressed linear in height

Other Parameters

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

Returns

matplotlib.scale.ScaleBase – A ScaleBase instance.