matplotlib 3.5.1

NotesParametersBackRef

Notes

In addition to the parameters above, the formatting of scientific vs. floating point representation can be configured via .set_scientific and .set_powerlimits ).

Offset notation and scientific notation

Offset notation and scientific notation look quite similar at first sight. Both split some information from the formatted tick values and display it at the end of the axis.

The following plot with x limits 1_000_000 to 1_000_010 illustrates the different formatting. Note the labels at the right edge of the x axis.

.. plot:: 
    lim = (1_000_000, 1_000_010)

    fig, (ax1, ax2, ax3) = plt.subplots(3, 1, gridspec_kw={'hspace': 2})
    ax1.set(title='offset_notation', xlim=lim)
    ax2.set(title='scientific notation', xlim=lim)
    ax2.xaxis.get_major_formatter().set_useOffset(False)
    ax3.set(title='floating point notation', xlim=lim)
    ax3.xaxis.get_major_formatter().set_useOffset(False)
    ax3.xaxis.get_major_formatter().set_scientific(False)

Parameters

useOffset : bool or float, default: :rc:`axes.formatter.useoffset`

Whether to use offset notation. See .set_useOffset .

useMathText : bool, default: :rc:`axes.formatter.use_mathtext`

Whether to use fancy math formatting. See .set_useMathText .

useLocale : bool, default: :rc:`axes.formatter.use_locale`.

Whether to use locale settings for decimal sign and positive sign. See .set_useLocale .

Format tick values as a number.

Examples

See :

Back References

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

matplotlib.pyplot.rgrids matplotlib.contour.ContourLabeler.clabel matplotlib.collections.PathCollection.legend_elements matplotlib.widgets.Slider.__init__ matplotlib.pyplot.colorbar matplotlib.figure.FigureBase.colorbar matplotlib.ticker matplotlib.axes._base._AxesBase.ticklabel_format matplotlib.widgets.RangeSlider.__init__ matplotlib.projections.polar.PolarAxes.set_rgrids matplotlib.pyplot.ticklabel_format matplotlib.pyplot.plotting

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#383
type: <class 'type'>
Commit: