Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions lib/matplotlib/dates.py
Original file line number Diff line number Diff line change
Expand Up @@ -1215,14 +1215,14 @@ class AutoDateLocator(DateLocator):
----------
intervald : dict

Mapping of tick frequencies (a constant from dateutil.rrule) to
multiples allowed for that ticking. The default looks like this::
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],
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],
Expand All @@ -1231,10 +1231,16 @@ class AutoDateLocator(DateLocator):
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.
You can customize this dictionary by doing::

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
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy