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.

  1. If scale is greater than 1, the axis is “accelerated” to the right of lower.

  2. If scale is less than 1, the axis is “decelerated” to the right of lower.

If upper is provided, you have the following three possibilities.

  1. If scale is numpy.inf, this puts a cliff between lower and upper. The axis discretely jumps from lower to upper.

  2. If scale is greater than 1, the axis is “accelerated” between lower and upper.

  3. If scale is less than 1, the axis is “decelerated” between lower and upper.

Parameters
  • axis (Axis) – The matplotlib axis. Required for compatibility reasons.

  • scale (float) – Value satisfying 0 < scale <= numpy.inf. If scale is greater than 1, values to the right of lower, or between lower and upper, 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

name

The registered scale name.