CutoffScale¶
-
class
CutoffScale(axis, scale, lower, upper=None, **kwargs)[source]¶ Bases:
proplot.axistools._ScaleBase,matplotlib.scale.ScaleBaseAxis scale with arbitrary cutoffs that “accelerate” parts of the axis, “decelerate” parts of the axes, or discretely jumps between numbers.
If
upperis not provided, you have the following two possibilities.If
scaleis greater than 1, the axis is “accelerated” to the right oflower.If
scaleis less than 1, the axis is “decelerated” to the right oflower.
If
upperis provided, you have the following three possibilities.If
scaleisnumpy.inf, this puts a cliff betweenlowerandupper. The axis discretely jumps fromlowertoupper.If
scaleis greater than 1, the axis is “accelerated” betweenlowerandupper.If
scaleis less than 1, the axis is “decelerated” betweenlowerandupper.
- Parameters
axis (
Axis) – The matplotlib axis. Required for compatibility reasons.scale (float) – Value satisfying
0 < scale <= numpy.inf. Ifscaleis greater than1, values to the right oflower, or betweenlowerandupper, 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 class-based and multi-axis solutions.
Attributes Summary
The registered scale name.