matplotlib 3.5.1

ParametersBackRef
set_useOffset(self, val)

When formatting a set numbers whose value is large compared to their range, the formatter can separate an additive constant. This can shorten the formatted numbers so that they are less likely to overlap when drawn on an axis.

Parameters

val : bool or float
  • If False, do not use offset notation.

  • If True (=automatic mode), use offset notation if it can make the residual numbers significantly shorter. The exact behavior is controlled by axes.formatter.offset_threshold .

  • If a number, force an offset of the given value.

Set whether to use offset notation.

Examples

With active offset notation, the values

100_000, 100_002, 100_004, 100_006, 100_008

will be formatted as 0, 2, 4, 6, 8 plus an offset +1e5 , which is written to the edge of the axis.

See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

matplotlib.ticker.ScalarFormatter.get_useOffset matplotlib.ticker.ScalarFormatter

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


File: /matplotlib/ticker.py#480
type: <class 'function'>
Commit: