| |
- dateutil.relativedelta.relativedelta
- dateutil.rrule.rrulebase
-
- dateutil.rrule.rrule
- matplotlib.ticker.Formatter(matplotlib.ticker.TickHelper)
-
- DateFormatter
- IndexDateFormatter
- matplotlib.ticker.Locator(matplotlib.ticker.TickHelper)
-
- DateLocator
-
- RRuleLocator
-
- DayLocator
- HourLocator
- MinuteLocator
- MonthLocator
- SecondLocator
- WeekdayLocator
- YearLocator
class DateFormatter(matplotlib.ticker.Formatter) |
|
Tick location is seconds since the epoch. Use a strftime format
string
python only supports datetime strftime formatting for years
greater than 1900. Thanks to Andrew Dalke, Dalke Scientific
Software who contributed the strftime code below to include dates
earlier than this year |
|
- Method resolution order:
- DateFormatter
- matplotlib.ticker.Formatter
- matplotlib.ticker.TickHelper
Methods defined here:
- __call__(self, x, pos=0)
- __init__(self, fmt, tz=None)
- fmt is an strftime format string; tz is the tzinfo instance
- set_tzinfo(self, tz)
- strftime(self, dt, fmt)
Data and other attributes defined here:
- illegal_s = <_sre.SRE_Pattern object at 0x845a530>
Methods inherited from matplotlib.ticker.Formatter:
- format_data(self, value)
- format_data_short(self, value)
- return a short string version
- get_offset(self)
- set_locs(self, locs)
Data and other attributes inherited from matplotlib.ticker.Formatter:
- locs = []
Methods inherited from matplotlib.ticker.TickHelper:
- set_bounds(self, vmin, vmax)
- Set dataInterval and viewInterval from numeric vmin, vmax.
This is for stand-alone use of Formatters and/or
Locators that require these intervals; that is, for
cases where the Intervals do not need to be updated
automatically.
- set_data_interval(self, interval)
- set_view_interval(self, interval)
- verify_intervals(self)
Data and other attributes inherited from matplotlib.ticker.TickHelper:
- dataInterval = None
- viewInterval = None
|
class DateLocator(matplotlib.ticker.Locator) |
| |
- Method resolution order:
- DateLocator
- matplotlib.ticker.Locator
- matplotlib.ticker.TickHelper
Methods defined here:
- __init__(self, tz=None)
- tz is the tzinfo instance
- datalim_to_dt(self)
- nonsingular(self, vmin, vmax)
- set_tzinfo(self, tz)
- viewlim_to_dt(self)
Data and other attributes defined here:
- hms0d = {'byhour': 0, 'byminute': 0, 'bysecond': 0}
Methods inherited from matplotlib.ticker.Locator:
- __call__(self)
- Return the locations of the ticks
- autoscale(self)
- autoscale the view limits
- pan(self, numsteps)
- Pan numticks (can be positive or negative)
- refresh(self)
- refresh internal information based on current lim
- zoom(self, direction)
- Zoom in/out on axis; if direction is >0 zoom in, else zoom out
Methods inherited from matplotlib.ticker.TickHelper:
- set_bounds(self, vmin, vmax)
- Set dataInterval and viewInterval from numeric vmin, vmax.
This is for stand-alone use of Formatters and/or
Locators that require these intervals; that is, for
cases where the Intervals do not need to be updated
automatically.
- set_data_interval(self, interval)
- set_view_interval(self, interval)
- verify_intervals(self)
Data and other attributes inherited from matplotlib.ticker.TickHelper:
- dataInterval = None
- viewInterval = None
|
class DayLocator(RRuleLocator) |
|
Make ticks on occurances of each day of the month, eg 1, 15, 30 |
|
- Method resolution order:
- DayLocator
- RRuleLocator
- DateLocator
- matplotlib.ticker.Locator
- matplotlib.ticker.TickHelper
Methods defined here:
- __init__(self, bymonthday=None, interval=1, tz=None)
- mark every day in bymonthday; bymonthday can be an int or sequence
Default is to tick every day of the month - bymonthday=range(1,32)
Methods inherited from RRuleLocator:
- __call__(self)
- autoscale(self)
- Set the view limits to include the data range
Methods inherited from DateLocator:
- datalim_to_dt(self)
- nonsingular(self, vmin, vmax)
- set_tzinfo(self, tz)
- viewlim_to_dt(self)
Data and other attributes inherited from DateLocator:
- hms0d = {'byhour': 0, 'byminute': 0, 'bysecond': 0}
Methods inherited from matplotlib.ticker.Locator:
- pan(self, numsteps)
- Pan numticks (can be positive or negative)
- refresh(self)
- refresh internal information based on current lim
- zoom(self, direction)
- Zoom in/out on axis; if direction is >0 zoom in, else zoom out
Methods inherited from matplotlib.ticker.TickHelper:
- set_bounds(self, vmin, vmax)
- Set dataInterval and viewInterval from numeric vmin, vmax.
This is for stand-alone use of Formatters and/or
Locators that require these intervals; that is, for
cases where the Intervals do not need to be updated
automatically.
- set_data_interval(self, interval)
- set_view_interval(self, interval)
- verify_intervals(self)
Data and other attributes inherited from matplotlib.ticker.TickHelper:
- dataInterval = None
- viewInterval = None
|
class HourLocator(RRuleLocator) |
|
Make ticks on occurances of each hour |
|
- Method resolution order:
- HourLocator
- RRuleLocator
- DateLocator
- matplotlib.ticker.Locator
- matplotlib.ticker.TickHelper
Methods defined here:
- __init__(self, byhour=None, interval=1, tz=None)
- mark every hour in byhour; byhour can be an int or sequence.
Default is to tick every hour - byhour=range(24)
interval is the interval between each iteration. Eg, if
interval=2, mark every second occurance
Methods inherited from RRuleLocator:
- __call__(self)
- autoscale(self)
- Set the view limits to include the data range
Methods inherited from DateLocator:
- datalim_to_dt(self)
- nonsingular(self, vmin, vmax)
- set_tzinfo(self, tz)
- viewlim_to_dt(self)
Data and other attributes inherited from DateLocator:
- hms0d = {'byhour': 0, 'byminute': 0, 'bysecond': 0}
Methods inherited from matplotlib.ticker.Locator:
- pan(self, numsteps)
- Pan numticks (can be positive or negative)
- refresh(self)
- refresh internal information based on current lim
- zoom(self, direction)
- Zoom in/out on axis; if direction is >0 zoom in, else zoom out
Methods inherited from matplotlib.ticker.TickHelper:
- set_bounds(self, vmin, vmax)
- Set dataInterval and viewInterval from numeric vmin, vmax.
This is for stand-alone use of Formatters and/or
Locators that require these intervals; that is, for
cases where the Intervals do not need to be updated
automatically.
- set_data_interval(self, interval)
- set_view_interval(self, interval)
- verify_intervals(self)
Data and other attributes inherited from matplotlib.ticker.TickHelper:
- dataInterval = None
- viewInterval = None
|
class IndexDateFormatter(matplotlib.ticker.Formatter) |
|
Use with IndexLocator to cycle format strings by index. |
|
- Method resolution order:
- IndexDateFormatter
- matplotlib.ticker.Formatter
- matplotlib.ticker.TickHelper
Methods defined here:
- __call__(self, x, pos=0)
- Return the label for time x at position pos
- __init__(self, t, fmt, tz=None)
- t is a sequence of dates floating point days). fmt is a
strftime format string
Methods inherited from matplotlib.ticker.Formatter:
- format_data(self, value)
- format_data_short(self, value)
- return a short string version
- get_offset(self)
- set_locs(self, locs)
Data and other attributes inherited from matplotlib.ticker.Formatter:
- locs = []
Methods inherited from matplotlib.ticker.TickHelper:
- set_bounds(self, vmin, vmax)
- Set dataInterval and viewInterval from numeric vmin, vmax.
This is for stand-alone use of Formatters and/or
Locators that require these intervals; that is, for
cases where the Intervals do not need to be updated
automatically.
- set_data_interval(self, interval)
- set_view_interval(self, interval)
- verify_intervals(self)
Data and other attributes inherited from matplotlib.ticker.TickHelper:
- dataInterval = None
- viewInterval = None
|
class MinuteLocator(RRuleLocator) |
|
Make ticks on occurances of each minute |
|
- Method resolution order:
- MinuteLocator
- RRuleLocator
- DateLocator
- matplotlib.ticker.Locator
- matplotlib.ticker.TickHelper
Methods defined here:
- __init__(self, byminute=None, interval=1, tz=None)
- mark every minute in byminute; byminute can be an int or
sequence. default is to tick every minute - byminute=range(60)
interval is the interval between each iteration. Eg, if
interval=2, mark every second occurance
Methods inherited from RRuleLocator:
- __call__(self)
- autoscale(self)
- Set the view limits to include the data range
Methods inherited from DateLocator:
- datalim_to_dt(self)
- nonsingular(self, vmin, vmax)
- set_tzinfo(self, tz)
- viewlim_to_dt(self)
Data and other attributes inherited from DateLocator:
- hms0d = {'byhour': 0, 'byminute': 0, 'bysecond': 0}
Methods inherited from matplotlib.ticker.Locator:
- pan(self, numsteps)
- Pan numticks (can be positive or negative)
- refresh(self)
- refresh internal information based on current lim
- zoom(self, direction)
- Zoom in/out on axis; if direction is >0 zoom in, else zoom out
Methods inherited from matplotlib.ticker.TickHelper:
- set_bounds(self, vmin, vmax)
- Set dataInterval and viewInterval from numeric vmin, vmax.
This is for stand-alone use of Formatters and/or
Locators that require these intervals; that is, for
cases where the Intervals do not need to be updated
automatically.
- set_data_interval(self, interval)
- set_view_interval(self, interval)
- verify_intervals(self)
Data and other attributes inherited from matplotlib.ticker.TickHelper:
- dataInterval = None
- viewInterval = None
|
class MonthLocator(RRuleLocator) |
|
Make ticks on occurances of each month month, eg 1, 3, 12 |
|
- Method resolution order:
- MonthLocator
- RRuleLocator
- DateLocator
- matplotlib.ticker.Locator
- matplotlib.ticker.TickHelper
Methods defined here:
- __init__(self, bymonth=None, bymonthday=1, interval=1, tz=None)
- mark every month in bymonth; bymonth can be an int or
sequence. default is range(1,13), ie every month
interval is the interval between each iteration. Eg, if
interval=2, mark every second occurance
Methods inherited from RRuleLocator:
- __call__(self)
- autoscale(self)
- Set the view limits to include the data range
Methods inherited from DateLocator:
- datalim_to_dt(self)
- nonsingular(self, vmin, vmax)
- set_tzinfo(self, tz)
- viewlim_to_dt(self)
Data and other attributes inherited from DateLocator:
- hms0d = {'byhour': 0, 'byminute': 0, 'bysecond': 0}
Methods inherited from matplotlib.ticker.Locator:
- pan(self, numsteps)
- Pan numticks (can be positive or negative)
- refresh(self)
- refresh internal information based on current lim
- zoom(self, direction)
- Zoom in/out on axis; if direction is >0 zoom in, else zoom out
Methods inherited from matplotlib.ticker.TickHelper:
- set_bounds(self, vmin, vmax)
- Set dataInterval and viewInterval from numeric vmin, vmax.
This is for stand-alone use of Formatters and/or
Locators that require these intervals; that is, for
cases where the Intervals do not need to be updated
automatically.
- set_data_interval(self, interval)
- set_view_interval(self, interval)
- verify_intervals(self)
Data and other attributes inherited from matplotlib.ticker.TickHelper:
- dataInterval = None
- viewInterval = None
|
class RRuleLocator(DateLocator) |
| |
- Method resolution order:
- RRuleLocator
- DateLocator
- matplotlib.ticker.Locator
- matplotlib.ticker.TickHelper
Methods defined here:
- __call__(self)
- __init__(self, o, tz=None)
- autoscale(self)
- Set the view limits to include the data range
Methods inherited from DateLocator:
- datalim_to_dt(self)
- nonsingular(self, vmin, vmax)
- set_tzinfo(self, tz)
- viewlim_to_dt(self)
Data and other attributes inherited from DateLocator:
- hms0d = {'byhour': 0, 'byminute': 0, 'bysecond': 0}
Methods inherited from matplotlib.ticker.Locator:
- pan(self, numsteps)
- Pan numticks (can be positive or negative)
- refresh(self)
- refresh internal information based on current lim
- zoom(self, direction)
- Zoom in/out on axis; if direction is >0 zoom in, else zoom out
Methods inherited from matplotlib.ticker.TickHelper:
- set_bounds(self, vmin, vmax)
- Set dataInterval and viewInterval from numeric vmin, vmax.
This is for stand-alone use of Formatters and/or
Locators that require these intervals; that is, for
cases where the Intervals do not need to be updated
automatically.
- set_data_interval(self, interval)
- set_view_interval(self, interval)
- verify_intervals(self)
Data and other attributes inherited from matplotlib.ticker.TickHelper:
- dataInterval = None
- viewInterval = None
|
class SecondLocator(RRuleLocator) |
|
Make ticks on occurances of each second |
|
- Method resolution order:
- SecondLocator
- RRuleLocator
- DateLocator
- matplotlib.ticker.Locator
- matplotlib.ticker.TickHelper
Methods defined here:
- __init__(self, bysecond=None, interval=1, tz=None)
- mark every second in bysecond; bysecond can be an int or
sequence. Default is to tick every second bysecond = range(60)
interval is the interval between each iteration. Eg, if
interval=2, mark every second occurance
Methods inherited from RRuleLocator:
- __call__(self)
- autoscale(self)
- Set the view limits to include the data range
Methods inherited from DateLocator:
- datalim_to_dt(self)
- nonsingular(self, vmin, vmax)
- set_tzinfo(self, tz)
- viewlim_to_dt(self)
Data and other attributes inherited from DateLocator:
- hms0d = {'byhour': 0, 'byminute': 0, 'bysecond': 0}
Methods inherited from matplotlib.ticker.Locator:
- pan(self, numsteps)
- Pan numticks (can be positive or negative)
- refresh(self)
- refresh internal information based on current lim
- zoom(self, direction)
- Zoom in/out on axis; if direction is >0 zoom in, else zoom out
Methods inherited from matplotlib.ticker.TickHelper:
- set_bounds(self, vmin, vmax)
- Set dataInterval and viewInterval from numeric vmin, vmax.
This is for stand-alone use of Formatters and/or
Locators that require these intervals; that is, for
cases where the Intervals do not need to be updated
automatically.
- set_data_interval(self, interval)
- set_view_interval(self, interval)
- verify_intervals(self)
Data and other attributes inherited from matplotlib.ticker.TickHelper:
- dataInterval = None
- viewInterval = None
|
class WeekdayLocator(RRuleLocator) |
|
Make ticks on occurances of each weekday |
|
- Method resolution order:
- WeekdayLocator
- RRuleLocator
- DateLocator
- matplotlib.ticker.Locator
- matplotlib.ticker.TickHelper
Methods defined here:
- __init__(self, byweekday=1, interval=1, tz=None)
- mark every weekday in byweekday; byweekday can be a number or
sequence
elements of byweekday must be one of MO, TU, WE, TH, FR, SA,
SU, the constants from dateutils.rrule
interval specifies the number of weeks to skip. Ie interval=2
plots every second week
Methods inherited from RRuleLocator:
- __call__(self)
- autoscale(self)
- Set the view limits to include the data range
Methods inherited from DateLocator:
- datalim_to_dt(self)
- nonsingular(self, vmin, vmax)
- set_tzinfo(self, tz)
- viewlim_to_dt(self)
Data and other attributes inherited from DateLocator:
- hms0d = {'byhour': 0, 'byminute': 0, 'bysecond': 0}
Methods inherited from matplotlib.ticker.Locator:
- pan(self, numsteps)
- Pan numticks (can be positive or negative)
- refresh(self)
- refresh internal information based on current lim
- zoom(self, direction)
- Zoom in/out on axis; if direction is >0 zoom in, else zoom out
Methods inherited from matplotlib.ticker.TickHelper:
- set_bounds(self, vmin, vmax)
- Set dataInterval and viewInterval from numeric vmin, vmax.
This is for stand-alone use of Formatters and/or
Locators that require these intervals; that is, for
cases where the Intervals do not need to be updated
automatically.
- set_data_interval(self, interval)
- set_view_interval(self, interval)
- verify_intervals(self)
Data and other attributes inherited from matplotlib.ticker.TickHelper:
- dataInterval = None
- viewInterval = None
|
class YearLocator(DateLocator) |
|
Make ticks on a given day of each year that is a multiple of base.
Examples:
# Tick every year on Jan 1st
locator = YearLocator()
# Tick every 5 years on July 4th
locator = YearLocator(5, month=7, day=4) |
|
- Method resolution order:
- YearLocator
- DateLocator
- matplotlib.ticker.Locator
- matplotlib.ticker.TickHelper
Methods defined here:
- __call__(self)
- __init__(self, base=1, month=1, day=1, tz=None)
- mark years that are multiple of base on a given month and day
(default jan 1)
- autoscale(self)
- Set the view limits to include the data range
Methods inherited from DateLocator:
- datalim_to_dt(self)
- nonsingular(self, vmin, vmax)
- set_tzinfo(self, tz)
- viewlim_to_dt(self)
Data and other attributes inherited from DateLocator:
- hms0d = {'byhour': 0, 'byminute': 0, 'bysecond': 0}
Methods inherited from matplotlib.ticker.Locator:
- pan(self, numsteps)
- Pan numticks (can be positive or negative)
- refresh(self)
- refresh internal information based on current lim
- zoom(self, direction)
- Zoom in/out on axis; if direction is >0 zoom in, else zoom out
Methods inherited from matplotlib.ticker.TickHelper:
- set_bounds(self, vmin, vmax)
- Set dataInterval and viewInterval from numeric vmin, vmax.
This is for stand-alone use of Formatters and/or
Locators that require these intervals; that is, for
cases where the Intervals do not need to be updated
automatically.
- set_data_interval(self, interval)
- set_view_interval(self, interval)
- verify_intervals(self)
Data and other attributes inherited from matplotlib.ticker.TickHelper:
- dataInterval = None
- viewInterval = None
|
class relativedelta |
|
The relativedelta type is based on the specification of the excelent
work done by M.-A. Lemburg in his mx.DateTime extension. However,
notice that this type does *NOT* implement the same algorithm as
his work. Do *NOT* expect it to behave like mx.DateTime's counterpart.
There's two different ways to build a relativedelta instance. The
first one is passing it two date/datetime classes:
relativedelta(datetime1, datetime2)
And the other way is to use the following keyword arguments:
year, month, day, hour, minute, second, microsecond:
Absolute information.
years, months, weeks, days, hours, minutes, seconds, microseconds:
Relative information, may be negative.
weekday:
One of the weekday instances (MO, TU, etc). These instances may
receive a parameter N, specifying the Nth weekday, which could
be positive or negative (like MO(+1) or MO(-2). Not specifying
it is the same as specifying +1. You can also use an integer,
where 0=MO.
leapdays:
Will add given days to the date found, if year is a leap
year, and the date found is post 28 of february.
yearday, nlyearday:
Set the yearday or the non-leap year day (jump leap days).
These are converted to day/month/leapdays information.
Here is the behavior of operations with relativedelta:
1) Calculate the absolute year, using the 'year' argument, or the
original datetime year, if the argument is not present.
2) Add the relative 'years' argument to the absolute year.
3) Do steps 1 and 2 for month/months.
4) Calculate the absolute day, using the 'day' argument, or the
original datetime day, if the argument is not present. Then,
subtract from the day until it fits in the year and month
found after their operations.
5) Add the relative 'days' argument to the absolute day. Notice
that the 'weeks' argument is multiplied by 7 and added to
'days'.
6) Do steps 1 and 2 for hour/hours, minute/minutes, second/seconds,
microsecond/microseconds.
7) If the 'weekday' argument is present, calculate the weekday,
with the given (wday, nth) tuple. wday is the index of the
weekday (0-6, 0=Mon), and nth is the number of weeks to add
forward or backward, depending on its signal. Notice that if
the calculated date is already Monday, for example, using
(0, 1) or (0, -1) won't change the day. |
|
Methods defined here:
- __add__(self, other)
- __div__(self, other)
- __eq__(self, other)
- __init__(self, dt1=None, dt2=None, years=0, months=0, days=0, leapdays=0, weeks=0, hours=0, minutes=0, seconds=0, microseconds=0, year=None, month=None, day=None, weekday=None, yearday=None, nlyearday=None, hour=None, minute=None, second=None, microsecond=None)
- __mul__(self, other)
- __ne__(self, other)
- __neg__(self)
- __nonzero__(self)
- __radd__(self, other)
- __repr__(self)
- __rsub__(self, other)
- __sub__(self, other)
|
class rrule(rrulebase) |
| |
Methods defined here:
- __init__(self, freq, dtstart=None, interval=1, wkst=None, count=None, until=None, bysetpos=None, bymonth=None, bymonthday=None, byyearday=None, byeaster=None, byweekno=None, byweekday=None, byhour=None, byminute=None, bysecond=None, cache=False)
Methods inherited from rrulebase:
- __contains__(self, item)
- __getitem__(self, item)
- __iter__(self)
- after(self, dt, inc=False)
- before(self, dt, inc=False)
- between(self, after, before, inc=False)
- count(self)
- # __len__() introduces a large performance penality.
| |