CutoffScale¶

class
CutoffScale
(axis, scale, lower, upper=None, **kwargs)[source]¶ Bases:
proplot.axistools._ScaleBase
,matplotlib.scale.ScaleBase
Axis scale with arbitrary cutoffs that “accelerate” parts of the axis, “decelerate” parts of the axes, or discretely jumps between numbers.
If
upper
is not provided, you have the following two possibilities.If
scale
is greater than 1, the axis is “accelerated” to the right oflower
.If
scale
is less than 1, the axis is “decelerated” to the right oflower
.
If
upper
is provided, you have the following three possibilities.If
scale
isnumpy.inf
, this puts a cliff betweenlower
andupper
. The axis discretely jumps fromlower
toupper
.If
scale
is greater than 1, the axis is “accelerated” betweenlower
andupper
.If
scale
is less than 1, the axis is “decelerated” betweenlower
andupper
.
 Parameters
axis (
Axis
) – The matplotlib axis. Required for compatibility reasons.scale (float) – Value satisfying
0 < scale <= numpy.inf
. Ifscale
is greater than1
, values to the right oflower
, or betweenlower
andupper
, are “accelerated”. Otherwise, values are “decelerated”. Infinity represents a discrete jump.lower (float) – The first cutoff point.
upper (float, optional) – The second cutoff point (optional, see above).
Todo
Add method for drawing diagonal “cutoff” strokes. See this post for classbased and multiaxis solutions.
Attributes Summary
The registered scale name.