matplotlib 3.5.1

ParametersBackRef
set_major_formatter(self, formatter)

In addition to a ~matplotlib.ticker.Formatter instance, this also accepts a str or function.

For a str a ~matplotlib.ticker.StrMethodFormatter is used. The field used for the value must be labeled 'x' and the field used for the position must be labeled 'pos' . See the ~matplotlib.ticker.StrMethodFormatter documentation for more information.

For a function, a ~matplotlib.ticker.FuncFormatter is used. The function must take two inputs (a tick value x and a position pos ), and return a string containing the corresponding tick label. See the ~matplotlib.ticker.FuncFormatter documentation for more information.

Parameters

formatter : `~matplotlib.ticker.Formatter`, ``str``, or function

Set the formatter of the major ticker.

Examples

See :

Back References

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

matplotlib.ticker matplotlib.axis.Axis.set_minor_formatter

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/axis.py#1567
type: <class 'function'>
Commit: