Scale¶
-
Scale
(scale, *args, **kwargs)[source]¶ Returns a
ScaleBase
instance, used to interpret thexscale
,xscale_kw
,yscale
, andyscale_kw
arguments when passed toformat
.- Parameters
scale (
ScaleBase
, str, (str, …), or class) – IfScaleBase
, 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'
Linear
'log'
Logarithmic
'symlog'
Logarithmic beyond finite space around zero
'logit'
Logistic
'inverse'
Inverse
'function'
Scale from arbitrary forward and backwards functions
'sine'
Sine function (in degrees)
'mercator'
Mercator latitude function (in degrees)
'exp'
Arbitrary exponential function
'power'
Arbitrary power function
'cutoff'
Arbitrary piecewise 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.