matplotlib 3.5.1

AttributesBackRef

Attributes

intervald : dict

Mapping of tick frequencies to multiples allowed for that ticking. The default is :

self.intervald = {
    YEARLY  : [1, 2, 4, 5, 10, 20, 40, 50, 100, 200, 400, 500,
               1000, 2000, 4000, 5000, 10000],
    MONTHLY : [1, 2, 3, 4, 6],
    DAILY   : [1, 2, 3, 7, 14, 21],
    HOURLY  : [1, 2, 3, 4, 6, 12],
    MINUTELY: [1, 5, 10, 15, 30],
    SECONDLY: [1, 5, 10, 15, 30],
    MICROSECONDLY: [1, 2, 5, 10, 20, 50, 100, 200, 500,
                    1000, 2000, 5000, 10000, 20000, 50000,
                    100000, 200000, 500000, 1000000],
}

where the keys are defined in dateutil.rrule .

The interval is used to specify multiples that are appropriate for the frequency of ticking. For instance, every 7 days is sensible for daily ticks, but for minutes/seconds, 15 or 30 make sense.

When customizing, you should only modify the values for the existing keys. You should not add or delete entries.

Example for forcing ticks every 3 hours:

locator = AutoDateLocator()
locator.intervald[HOURLY] = [3]  # only show every 3 hours

On autoscale, this class picks the best DateLocator to set the view limits and the tick locations.

Examples

See :

Back References

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

matplotlib.pyplot.plot_date matplotlib.axes._axes.Axes.plot_date matplotlib.dates.AutoDateFormatter matplotlib.dates

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/dates.py#1235
type: <class 'type'>
Commit: