Files
old-parkingkoncept/parkingkonceptvenv/lib/python3.7/site-packages/matplotlib/__pycache__/dates.cpython-37.pyc

910 lines
58 KiB
Plaintext
Raw Normal View History

2019-11-17 12:44:16 +01:00
B
U<>]<5D><00>@sdZddlZddlZddlZddlZddlZddlZddlZddlm Z m
Z
m Z m Z m Z mZmZmZmZmZmZmZmZmZmZddlmZddlZddlZddlZddlZddlm Z ddl!m"Z"ddl#m$Z$ddl%m&Z&dZ'e<03>(e)<29>Z*ej+j,Z-dd<08>Z.e/e<01>d d
d
<EFBFBD><03>0<EFBFBD><00>Z1d Z2ed
Z3d Z4d Z5d Z6dZ7dZ8dZ9dZ:e5e4Z;e6e5Z<e<e4Z=e=e8Z>de=Z?e
e e e eeef\Z@ZAZBZCZDZEZFe@eAeBeCeDeEeFfZGdd<14>ZHe<1E>IeH<65>ZJdd<16>ZKdedd<18>ZLe<1E>IeL<65>ZMe$jNddd<1B>Gdd<1D>deO<65><03>ZPe$jNddd<1B>Gdd<1F>deP<65><03>ZQe<1E>IejRjS<6A>ZTdfd d!<21>ZUd"d#<23>ZVd$d%<25>ZWd&d'<27>ZXdgd(d)<29>ZYd*d+<2B>ZZe<1E>IeZ<65>Z[d,d-<2D>Z\d.d/<2F>Z]Gd0d1<64>d1e&j^<5E>Z_Gd2d3<64>d3e&j^<5E>Z`Gd4d5<64>d5e&j^<5E>ZaGd6d7<64>d7e&j^<5E>ZbGd8d9<64>d9eO<65>ZcGd:d;<3B>d;e&jd<6A>ZeGd<d=<3D>d=ee<65>ZfGd>d?<3F>d?ee<65>ZgGd@dA<64>dAee<65>ZhGdBdC<64>dCef<65>ZiGdDdE<64>dEef<65>ZjGdFdG<64>dGef<65>ZkGdHdI<64>dIef<65>ZlGdJdK<64>dKef<65>ZmGdLdM<64>dMef<65>ZnGdNdO<64>dOee<65>ZodPdQ<64>ZpdRdS<64>ZqdTdU<64>ZrdhdWdX<64>Zse$<24>Nd<19>dYdZ<64><00>Zte$<24>Nd<19>d[d\<5C><00>Zue$<24>Nd<19>d]d^<5E><00>Zve$<24>Nd<19>d_d`<60><00>ZwGdadb<64>dbe"jx<6A>ZyGdcdd<64>ddey<65>Zzey<65>e"j{ej|<ey<65>e"j{ej}<ey<65>e"j{ej<dS)ia<69>
Matplotlib provides sophisticated date plotting capabilities, standing on the
shoulders of python :mod:`datetime` and the add-on module :mod:`dateutil`.
.. _date-format:
Matplotlib date format
----------------------
Matplotlib represents dates using floating point numbers specifying the number
of days since 0001-01-01 UTC, plus 1. For example, 0001-01-01, 06:00 is 1.25,
not 0.25. Values < 1, i.e. dates before 0001-01-01 UTC are not supported.
There are a number of helper functions to convert between :mod:`datetime`
objects and Matplotlib dates:
.. currentmodule:: matplotlib.dates
.. autosummary::
:nosignatures:
datestr2num
date2num
num2date
num2timedelta
epoch2num
num2epoch
mx2num
drange
.. note::
Like Python's datetime, mpl uses the Gregorian calendar for all
conversions between dates and floating point numbers. This practice
is not universal, and calendar differences can cause confusing
differences between what Python and mpl give as the number of days
since 0001-01-01 and what other software and databases yield. For
example, the US Naval Observatory uses a calendar that switches
from Julian to Gregorian in October, 1582. Hence, using their
calculator, the number of days between 0001-01-01 and 2006-04-01 is
732403, whereas using the Gregorian calendar via the datetime
module we find::
In [1]: date(2006, 4, 1).toordinal() - date(1, 1, 1).toordinal()
Out[1]: 732401
All the Matplotlib date converters, tickers and formatters are timezone aware.
If no explicit timezone is provided, the rcParam ``timezone`` is assumed. If
you want to use a custom time zone, pass a :class:`datetime.tzinfo` instance
with the tz keyword argument to :func:`num2date`, :func:`.plot_date`, and any
custom date tickers or locators you create.
A wide range of specific and general purpose date tick locators and
formatters are provided in this module. See
:mod:`matplotlib.ticker` for general information on tick locators
and formatters. These are described below.
The dateutil_ module provides additional code to handle date ticking, making it
easy to place ticks on any kinds of dates. See examples below.
.. _dateutil: https://dateutil.readthedocs.io
Date tickers
------------
Most of the date tickers can locate single or multiple values. For
example::
# import constants for the days of the week
from matplotlib.dates import MO, TU, WE, TH, FR, SA, SU
# tick on mondays every week
loc = WeekdayLocator(byweekday=MO, tz=tz)
# tick on mondays and saturdays
loc = WeekdayLocator(byweekday=(MO, SA))
In addition, most of the constructors take an interval argument::
# tick on mondays every second week
loc = WeekdayLocator(byweekday=MO, interval=2)
The rrule locator allows completely general date ticking::
# tick every 5th easter
rule = rrulewrapper(YEARLY, byeaster=1, interval=5)
loc = RRuleLocator(rule)
Here are all the date tickers:
* :class:`MicrosecondLocator`: locate microseconds
* :class:`SecondLocator`: locate seconds
* :class:`MinuteLocator`: locate minutes
* :class:`HourLocator`: locate hours
* :class:`DayLocator`: locate specified days of the month
* :class:`WeekdayLocator`: Locate days of the week, e.g., MO, TU
* :class:`MonthLocator`: locate months, e.g., 7 for july
* :class:`YearLocator`: locate years that are multiples of base
* :class:`RRuleLocator`: locate using a `matplotlib.dates.rrulewrapper`.
`.rrulewrapper` is a simple wrapper around dateutil_'s `dateutil.rrule`
which allow almost arbitrary date tick specifications. See :doc:`rrule
example </gallery/ticks_and_spines/date_demo_rrule>`.
* :class:`AutoDateLocator`: On autoscale, this class picks the best
:class:`DateLocator` (e.g., :class:`RRuleLocator`)
to set the view limits and the tick
locations. If called with ``interval_multiples=True`` it will
make ticks line up with sensible multiples of the tick intervals. E.g.
if the interval is 4 hours, it will pick hours 0, 4, 8, etc as ticks.
This behaviour is not guaranteed by default.
Date formatters
---------------
Here all all the date formatters:
* :class:`AutoDateFormatter`: attempts to figure out the best format
to use. This is most useful when used with the :class:`AutoDateLocator`.
* :class:`ConciseDateFormatter`: also attempts to figure out the best
format to use, and to make the format as compact as possible while
still having complete date information. This is most useful when used
with the :class:`AutoDateLocator`.
* :class:`DateFormatter`: use :func:`strftime` format strings
* :class:`IndexDateFormatter`: date plots with implicit *x*
indexing.
<EFBFBD>N)<0F>rrule<6C>MO<4D>TU<54>WE<57>TH<54>FR<46>SA<53>SU<53>YEARLY<4C>MONTHLY<4C>WEEKLY<4C>DAILY<4C>HOURLY<4C>MINUTELY<4C>SECONDLY)<01> relativedelta)<01>rcParams),<2C> datestr2num<75>date2num<75>num2date<74> num2timedelta<74>drange<67> epoch2num<75> num2epoch<63>mx2num<75> DateFormatter<65>ConciseDateFormatter<65>IndexDateFormatter<65>AutoDateFormatter<65> DateLocator<6F> RRuleLocator<6F>AutoDateLocator<6F> YearLocator<6F> MonthLocator<6F>WeekdayLocator<6F>
DayLocator<EFBFBD> HourLocator<6F> MinuteLocator<6F> SecondLocator<6F>MicrosecondLocatorrrrrrrrr r
r r r rrr<00> MICROSECONDLYr<00>seconds<64>minutes<65>hours<72>weekscCs"tjd}|dkrtStj<04>|<00>S)z=Retrieve the preferred timezone from the rcParams dictionary.<2E>timezone<6E>UTC)<06>
matplotlibrr0<00>dateutil<69>tzZgettz)<01>s<>r5<00>8/tmp/pip-install-i8dhxrtk/matplotlib/matplotlib/dates.py<70>_get_rc_timezone<6E>s
r7i<><00>g<00>PD:Ag8@gN@g(@g@g>@g<00>v@g<00><>.AcCs|t|dd<02>}|dk r"|<00>t<02>}t}t|<00><04><00>}t|ddd<05><00><03>}|dk rxtjd|d<07>}tj<05>||<04>}|||<00><08>t 7}|S)z<>
Convert :mod:`datetime` or :mod:`date` to the Gregorian date as UTC float
days, preserving hours, minutes, seconds and microseconds. Return value
is a :func:`float`.
<20>tzinfoN<6F>datecSsdS)Nr5r5r5r5r6<00><lambda><3E><00>z_to_ordinalf.<locals>.<lambda>r)r9)
<EFBFBD>getattr<74>
astimezoner0<00>float<61> toordinal<61>datetime<6D>time<6D>combine<6E> total_seconds<64> SEC_PER_DAY)<06>dtZtzi<7A>baseZcdateZ midnight_timeZrdtr5r5r6<00> _to_ordinalf<6C>s 
 rHcCs<>||<00>d<01><00>d<02>}t<01>dd<04>}|<00>d<01>|<00>tj<03>}||<01>tj<03>d7}|td}t<01>d<07><01>tj<05>}|<00>tj<05>}ytj|||k<Wn"tk
r<EFBFBD>||kr<>tj}YnX|S)au
Convert `numpy.datetime64` or an ndarray of those types to Gregorian
date as UTC float. Roundoff is via float64 precision. Practically:
microseconds for dates between 290301 BC, 294241 AD, milliseconds for
larger dates (see `numpy.datetime64`). Nanoseconds aren't possible
because we do times compared to ``0001-01-01T00:00:00`` (plus one day).
z datetime64[s]ztimedelta64[ns]z0001-01-01T00:00:00r4ge<><65>Ag<00>?ZNaT)<08>astype<70>np<6E>
datetime64Zfloat64rEZint64<36>nan<61> TypeError)<06>d<>extra<72>t0rFZNaT_intZd_intr5r5r6<00>_dt64_to_ordinalf<6C>s     rQcCs<>|dkrt<00>}t|d<02>\}}t|<02>}|dkr:td<03>|<02><01><01>tj<05>|<02>jtd<04>}d}tt |t
|<00>|<00>}|dkr<>tt |t
<00><01>}|tj |d<07>7}|<04> |<01>S)ax
Convert Gregorian float of the date, preserving hours, minutes,
seconds and microseconds. Return value is a `.datetime`.
The input date *x* is a float in ordinal days at UTC, and the output will
be the specified `.datetime` object corresponding to that time in
timezone *tz*, or if *tz* is ``None``, in the timezone specified in
:rc:`timezone`.
Nr8z|Cannot convert {} to a date. This often happens if non-datetime values are passed to an axis that expects datetime objects.)r9<00>i<>*)<01> microseconds) r7<00>divmod<6F>int<6E>
ValueError<EFBFBD>formatrA<00> fromordinal<61>replacer0<00>round<6E>MUSECONDS_PER_DAY<41> timedeltar>)<07>xr3<00>ix<69> remainderrFZ
musec_precZremainder_musecr5r5r6<00>_from_ordinalfs
r`z3.1z5time.strptime or dateutil.parser.parse or datestr2num)<01> alternativec@s eZdZdZdd<03>Zdd<05>ZdS)<07> strpdate2numz<6D>
Use this class to parse date strings to matplotlib datenums when
you know the date format string of the date you are parsing.
cCs
||_dS)z- fmt: any valid strptime format is supported N)<01>fmt)<02>selfrcr5r5r6<00>__init__Cszstrpdate2num.__init__cCs ttjt<02>||j<04>dd<02><00><00>S)zMs : string to be converted
return value: a date2num float
N<>)rrArB<00>strptimerc)rdr4r5r5r6<00>__call__Gszstrpdate2num.__call__N)<06>__name__<5F>
__module__<EFBFBD> __qualname__<5F>__doc__rerhr5r5r5r6rb<srbcs.eZdZdZd<07>fdd<04> Z<04>fdd<06>Z<05>ZS)<08>bytespdate2numz<6D>
Use this class to parse date strings to matplotlib datenums when
you know the date format string of the date you are parsing. See
:doc:`/gallery/misc/load_converter.py`.
<20>utf-8cst<00><00>|<01>||_dS)z<>
Args:
fmt: any valid strptime format is supported
encoding: encoding to use on byte input (default: 'utf-8')
N)<03>superre<00>encoding)rdrcrp)<01> __class__r5r6reVs zbytespdate2num.__init__cs|<01>|j<01>}t<02><00>|<02>S)zo
Args:
b: byte input to be converted
Returns:
A date2num float
)<04>decoderprorh)rd<00>br4)rqr5r6rh_s zbytespdate2num.__call__)rn)rirjrkrlrerh<00> __classcell__r5r5)rqr6rmNs rmcs`t|t<01>r"tjj|<00>d<01>}t|<02>S<00>dk r<<3C>fdd<04>|D<00>}t<06>|<00>}|jsP|Stt |<00><01>SdS)a
Convert a date string to a datenum using :func:`dateutil.parser.parse`.
Parameters
----------
d : string or sequence of strings
The dates to convert.
default : datetime instance, optional
The default date to use when fields are missing in *d*.
)<01>defaultNcsg|]}tjj|<01>d<00><02>qS))ru)r2<00>parser<65>parse)<02>.0r4)rur5r6<00>
<listcomp>szdatestr2num.<locals>.<listcomp>)
<EFBFBD>
isinstance<EFBFBD>strr2rvrwrrJ<00>asarray<61>size<7A>$_dateutil_parser_parse_np_vectorized)rNrurFr5)rur6rns

rcCs<>t|d<01>r|j}t<02>|<00>sRt|tj<05>sBt|tj<06>rJt<02>|jtj<05>rJt |<00>St
|<00>St<02> |<00>}t<02>|jtj<05>rtt |<00>S|j s~|St |<00>SdS)a#
Convert datetime objects to Matplotlib dates.
Parameters
----------
d : `datetime.datetime` or `numpy.datetime64` or sequences of these
Returns
-------
float or sequence of floats
Number of days (fraction part represents hours, minutes, seconds, ms)
since 0001-01-01 00:00:00 UTC, plus one.
Notes
-----
The addition of one here is a historical artifact. Also, note that the
Gregorian calendar is assumed; this is not universal practice.
For details see the module docstring.
<20>valuesN)<0E>hasattrrrJ<00>iterablerzrK<00>ndarrayZ
issubdtypeZdtyperQrHr|r}<00>_to_ordinalf_np_vectorized)rNr5r5r6r<00>s

  
rcCst<00>|<00>rt<00>|<00>}|tS)z<>
Convert a Julian date (or sequence) to a Matplotlib date (or sequence).
Parameters
----------
j : float or sequence of floats
Julian date(s)
Returns
-------
float or sequence of floats
Matplotlib date(s)
)rJr<>r|<00> JULIAN_OFFSET)<01>jr5r5r6<00>
julian2num<EFBFBD>s

r<>cCst<00>|<00>rt<00>|<00>}|tS)z<>
Convert a Matplotlib date (or sequence) to a Julian date (or sequence).
Parameters
----------
n : float or sequence of floats
Matplotlib date(s)
Returns
-------
float or sequence of floats
Julian date(s)
)rJr<>r|r<>)<01>nr5r5r6<00>
num2julian<EFBFBD>s

r<>cCsH|dkrt<00>}t<01>|<00>s"t||<01>St<01>|<00>}|js6|St||<01><02><07>SdS)a

Convert Matplotlib dates to `~datetime.datetime` objects.
Parameters
----------
x : float or sequence of floats
Number of days (fraction part represents hours, minutes, seconds)
since 0001-01-01 00:00:00 UTC, plus one.
tz : string, optional
Timezone of *x* (defaults to rcparams ``timezone``).
Returns
-------
`~datetime.datetime` or sequence of `~datetime.datetime`
Dates are returned in timezone *tz*.
If *x* is a sequence, a sequence of :class:`datetime` objects will
be returned.
Notes
-----
The addition of one here is a historical artifact. Also, note that the
Gregorian calendar is assumed; this is not universal practice.
For details, see the module docstring.
N)r7rJr<>r`r|r}<00>_from_ordinalf_np_vectorized<65>tolist)r]r3r5r5r6r<00>s


rcCs tj|d<01>S)N)<01>days)rAr\)r]r5r5r6<00>_ordinalf_to_timedelta<74>sr<>cCs6t<00>|<00>st|<00>St<00>|<00>}|js&|St|<00><01><06>SdS)a<>
Convert number of days to a `~datetime.timedelta` object.
If *x* is a sequence, a sequence of `~datetime.timedelta` objects will
be returned.
Parameters
----------
x : float, sequence of floats
Number of days. The fraction part represents hours, minutes, seconds.
Returns
-------
`datetime.timedelta` or list[`datetime.timedelta`]
N)rJr<>r<>r|r}<00>$_ordinalf_to_timedelta_np_vectorizedr<64>)r]r5r5r6r<00>s 

rcCspt|<00>}t|<01>}|<02><01>t}tt<04>|||<00><01>}|||}||krV||8}|d8}t|<07>}t<04>|||d<00>S)a<>
Return a sequence of equally spaced Matplotlib dates.
The dates start at *dstart* and reach up to, but not including *dend*.
They are spaced by *delta*.
Parameters
----------
dstart, dend : `~datetime.datetime`
The date limits.
delta : `datetime.timedelta`
Spacing of the dates.
Returns
-------
drange : `numpy.array`
A list floats representing Matplotlib dates.
r8)rrDrErUrJ<00>ceilZlinspace)ZdstartZdend<6E>delta<74>f1<66>f2<66>step<65>numZ dinterval_endr5r5r6rs  rc@speZdZdZe<04>d<02>Zddd<05>Zddd<08>Zd d
<EFBFBD>Z e
<EFBFBD> d <0B>d d <0A><00>Z e
<EFBFBD> d <0B>ddd<0F><01>Z e
<EFBFBD> d <0B>ddd<11><01>ZdS)rzU
Format a tick (in seconds since the epoch) with a `strftime` format string.
z((^|[^%])(%%)*%s)NcCs|dkrt<00>}||_||_dS)z|
Parameters
----------
fmt : str
`strftime` format string
tz : `tzinfo`
N)r7rcr3)rdrcr3r5r5r6reJszDateFormatter.__init__rcCs$|dkrtd<02><01>t||j<02><02>|j<04>S)Nrz<>DateFormatter found a value of x=0, which is an illegal date; this usually occurs because you have not informed the axis that it is plotting dates, e.g., with ax.xaxis_date())rVrr3<00>strftimerc)rdr]<00>posr5r5r6rhWszDateFormatter.__call__cCs
||_dS)N)r3)rdr3r5r5r6<00>
set_tzinfo_szDateFormatter.set_tzinfoz3.0cCs<>d}x<>|<01>||<06>}|dkrP|d}|||t|<04><00>|kr>q|d|<07>|||t|<03>d<04>}|d|<07>|||t|<04>d<04>}qW||fS)a&Helper function for replacing substrings sub1 and sub2
located at the same indexes in strings s1 and s2 respectively,
with the string replacement. It is expected that sub1 and sub2
have the same length. Returns the pair s1, s2 after the
substitutions.
r<00><><EFBFBD><EFBFBD><EFBFBD>r8N)<02>find<6E>len)rd<00>s1<73>s2Zsub1Zsub2<62> replacement<6E>ir<69>r5r5r6<00>_replace_common_substrbs  $(z$DateFormatter._replace_common_substrc
Cs|dkr|j}t<01>dd<03>|j<04>|<02>}|j}d|}d|d|d}||}|d|dd}|d}|<01><06>}t<07>||f|d d<01><00>} t<07>||f|d d<01><00>}
|<00> | |
d
<EFBFBD>|<06>d
<EFBFBD>|<07>d
<EFBFBD>|j<05><01>\} }
|<00> | |
d <0B>|d<00>d <0B>|d<00>d <0B>|jd<00><01>\} }
t
<EFBFBD> | <09>S) a{Call time.strftime for years before 1900 by rolling
forward a multiple of 28 years.
*fmt* is a :func:`strftime` format string.
Dalke: I hope I did this math right. Every 28 years the
calendar repeats, except through century leap years excepting
the 400 year leap years. But only if you're using the Gregorian
calendar.
Nz((^|[^%])(%%)*)%fz \g<1>{0:06d}i<>rf<00>di<><00>r8z{0:04d}z{0:02d}) rc<00>re<72>subrW<00> microsecond<6E>year<61> timetuplerBr<>r<><00>cbook<6F> unicode_safe) rdrFrcr<>r<><00>offZyear1Zyear2r<32>r<>r<>r5r5r6<00>strftime_pre_1900|s,  
  zDateFormatter.strftime_pre_1900cCsN|dkr|j}|j<01>d|<02>}|<02>dd<04>}|jdkrBt<05>|<01>|<02><01>S|<00>||<02>S)a{
Refer to documentation for :meth:`datetime.datetime.strftime`
*fmt* is a :meth:`datetime.datetime.strftime` format string.
Warning: For years before 1900, depending upon the current
locale it is possible that the year displayed with %x might
be incorrect. For years before 100, %y and %Y will yield
zero-padded strings.
Nz\1z%sr4il) rc<00> illegal_sr<73>rYr<>r<>r<>r<>r<>)rdrFrcr5r5r6r<><00>s  
zDateFormatter.strftime)N)r)N)N)rirjrkrlr<><00>compiler<65>rerhr<>r<><00>
deprecatedr<EFBFBD>r<>r<>r5r5r5r6rCs

 9rc@s$eZdZdZddd<04>Zd dd<07>ZdS)
rza
Use with :class:`~matplotlib.ticker.IndexLocator` to cycle format
strings by index.
NcCs$|dkrt<00>}||_||_||_dS)zw
*t* is a sequence of dates (floating point days). *fmt* is a
:func:`strftime` format string.
N)r7<00>trcr3)rdr<>rcr3r5r5r6re<00>s
zIndexDateFormatter.__init__rcCsBtt<01>|<01><01>}|t|j<04>ks$|dkr(dSt|j||j<06><02>|j<08>S)z/Return the label for time *x* at position *pos*r<00>) rUrJrZr<>r<>rr3r<>rc)rdr]r<><00>indr5r5r6rh<00>szIndexDateFormatter.__call__)N)r)rirjrkrlrerhr5r5r5r6r<00>s
rc@s<eZdZdZddd<05>Zddd<07>Zdd <09>Zd
d <0B>Zd d <0A>ZdS)ra
This class attempts to figure out the best format to use for the
date, and to make it as compact as possible, but still be complete. This is
most useful when used with the :class:`AutoDateLocator`::
>>> locator = AutoDateLocator()
>>> formatter = ConciseDateFormatter(locator)
Parameters
----------
locator : `.ticker.Locator`
Locator that this axis is using.
tz : string, optional
Passed to `.dates.date2num`.
formats : list of 6 strings, optional
Format strings for 6 levels of tick labelling: mostly years,
months, days, hours, minutes, and seconds. Strings use
the same format codes as `strftime`. Default is
``['%Y', '%b', '%d', '%H:%M', '%H:%M', '%S.%f']``
zero_formats : list of 6 strings, optional
Format strings for tick labels that are "zeros" for a given tick
level. For instance, if most ticks are months, ticks around 1 Jan 2005
will be labeled "Dec", "2005", "Feb". The default is
``['', '%Y', '%b', '%b-%d', '%H:%M', '%H:%M']``
offset_formats : list of 6 strings, optional
Format strings for the 6 levels that is applied to the "offset"
string found on the right side of an x-axis, or top of a y-axis.
Combined with the tick labels this should completely specify the
date. The default is::
['', '%Y', '%Y-%b', '%Y-%b-%d', '%Y-%b-%d', '%Y-%b-%d %H:%M']
show_offset : bool
Whether to show the offset or not. Default is ``True``.
Examples
--------
See :doc:`/gallery/ticks_and_spines/date_concise_formatter`
.. plot::
import datetime
import matplotlib.dates as mdates
base = datetime.datetime(2005, 2, 1)
dates = np.array([base + datetime.timedelta(hours=(2 * i))
for i in range(732)])
N = len(dates)
np.random.seed(19680801)
y = np.cumsum(np.random.randn(N))
fig, ax = plt.subplots(constrained_layout=True)
locator = mdates.AutoDateLocator()
formatter = mdates.ConciseDateFormatter(locator)
ax.xaxis.set_major_locator(locator)
ax.xaxis.set_major_formatter(formatter)
ax.plot(dates, y)
ax.set_title('Concise Date Formatter')
NTcCs<>||_||_d|_|r2t|<03>dkr*td<03><01>||_nddddddg|_|rdt|<03>dkr\td<08><01>||_n<|r<>d g|jd
d <0B>|_n d g|jd
d <0B>|_d |jd <|r<>t|<04>dkr<>td<0E><01>||_nd dddddg|_d |_||_ d
S)z<>
Autoformat the date labels. The default format is used to form an
initial string, and then redundant elements are removed.
z%Yrfz=formats argument must be a list of 6 format strings (or None)z%bz%dz%H:%Mz%S.%fzBzero_formats argument must be a list of 6 format strings (or None)r<>Nr<4E>z%b-%d<>z@offsetfmts argument must be a list of 6 format strings (or None)z%Y-%bz%Y-%b-%dz%Y-%b-%d %H:%M)
<EFBFBD>_locator<6F>_tz<74>
defaultfmtr<EFBFBD>rV<00>formats<74> zero_formats<74>offset_formats<74> offset_string<6E> show_offset)rd<00>locatorr3r<>r<>r<>r<>r5r5r6re,sB  
 zConciseDateFormatter.__init__cCst|j|j<02>}|||d<01>S)N)r<>)rr<>r<>)rdr]r<><00> formatterr5r5r6rheszConciseDateFormatter.__call__c Cs<>dd<02>|D<00>}t<00>dd<02>|D<00><01>}|j}|j}|j}x4tddd<05>D]$}tt<00>|dd<00>|f<00><01>dkrBPqBWdddddddg}dgt|<03>} x<>tt|<03><01>D]|}
|dkr<>||
|||kr<>||} n||} n6||
j||
j kr<>dkr<>nn
||} n||} ||
<00>
| <0B>| |
<q<>W|dk<05>r<>t d d
<EFBFBD>| D<00>dd <0B>} | <0C>r<>x@tt| <09><01>D]0}
d | |
k<06>rL| |
d| <00><00> d <0C>| |
<<00>qLW|j <0A>r<>|d<00>
||<00>|_| S) NcSsg|] }t|<01><01>qSr5)r)rx<00>valuer5r5r6ryjsz5ConciseDateFormatter.format_ticks.<locals>.<listcomp>cSsg|]}|<01><00>dd<01><00>qS)Nrf)r<>)rxZtdtr5r5r6ryks<00>r<>r8rr<>css,|]$}d|krt|<01>t|<01>d<01><01>VqdS)<03>.<2E>0N)r<><00>rstrip)rxr4r5r5r6<00> <genexpr><3E>sz4ConciseDateFormatter.format_ticks.<locals>.<genexpr>)rur<>)rJ<00>arrayr<79>r<>r<><00>ranger<65><00>unique<75>secondr<64>r<><00>minr<6E>r<>r<>) rdrZ tickdatetimeZtickdateZfmtsZzerofmtsZ
offsetfmts<EFBFBD>levelZzerovals<6C>labels<6C>nnrcZtrailing_zerosr5r5r6<00> format_ticksis>

 

 "z!ConciseDateFormatter.format_tickscCs|jS)N)r<>)rdr5r5r6<00>
get_offset<EFBFBD>szConciseDateFormatter.get_offsetcCst|<01><01>d<01>S)Nz%Y-%m-%d %H:%M:%S)rr<>)rdr<>r5r5r6<00>format_data_short<72>sz&ConciseDateFormatter.format_data_short)NNNNT)N) rirjrkrlrerhr<>r<>r<>r5r5r5r6r<00>sD
8
?rc@s,eZdZdZd
dd<05>Zdd<07>Zd dd <09>ZdS) ran
This class attempts to figure out the best format to use. This is
most useful when used with the :class:`AutoDateLocator`.
The AutoDateFormatter has a scale dictionary that maps the scale
of the tick (the distance in days between one major tick) and a
format string. The default looks like this::
self.scaled = {
DAYS_PER_YEAR: rcParams['date.autoformat.year'],
DAYS_PER_MONTH: rcParams['date.autoformat.month'],
1.0: rcParams['date.autoformat.day'],
1. / HOURS_PER_DAY: rcParams['date.autoformat.hour'],
1. / (MINUTES_PER_DAY): rcParams['date.autoformat.minute'],
1. / (SEC_PER_DAY): rcParams['date.autoformat.second'],
1. / (MUSECONDS_PER_DAY): rcParams['date.autoformat.microsecond'],
}
The algorithm picks the key in the dictionary that is >= the
current scale and uses that format string. You can customize this
dictionary by doing::
>>> locator = AutoDateLocator()
>>> formatter = AutoDateFormatter(locator)
>>> formatter.scaled[1/(24.*60.)] = '%M:%S' # only show min and sec
A custom :class:`~matplotlib.ticker.FuncFormatter` can also be used.
The following example shows how to use a custom format function to strip
trailing zeros from decimal seconds and adds the date to the first
ticklabel::
>>> def my_format_function(x, pos=None):
... x = matplotlib.dates.num2date(x)
... if pos == 0:
... fmt = '%D %H:%M:%S.%f'
... else:
... fmt = '%H:%M:%S.%f'
... label = x.strftime(fmt)
... label = label.rstrip("0")
... label = label.rstrip(".")
... return label
>>> from matplotlib.ticker import FuncFormatter
>>> formatter.scaled[1/(24.*60.)] = FuncFormatter(my_format_function)
N<>%Y-%m-%dcCsr||_||_||_t|j|<02>|_ttdttddtddttddt tddt
tddt tdi|_ d S)
z<EFBFBD>
Autoformat the date labels. The default format is the one to use
if none of the values in ``self.scaled`` are greater than the unit
returned by ``locator._get_unit()``.
zdate.autoformatter.yearzdate.autoformatter.monthg<00>?zdate.autoformatter.dayzdate.autoformatter.hourzdate.autoformatter.minutezdate.autoformatter.secondzdate.autoformatter.microsecondN) r<>r<>r<>r<00>
_formatter<EFBFBD> DAYS_PER_YEARr<00>DAYS_PER_MONTH<54> HOURS_PER_DAY<41>MINUTES_PER_DAYrEr[<00>scaled)rdr<>r3r<>r5r5r6re<00>s zAutoDateFormatter.__init__cCs
||_dS)N)r<>)rdr<>r5r5r6<00> _set_locator<6F>szAutoDateFormatter._set_locatorcs<>yt|j<01><02><00><01>Wntk
r*d<01>YnXt<04>fdd<03>t|j<06><07><00>D<00>|j<08>}t |t
<EFBFBD>rvt ||j <0C>|_ |<00> ||<02>}n"t|<03>r<>|||<02>}ntd<04>|<00><01><01>|S)Nr8c3s|]\}}|<01>kr|VqdS)Nr5)rxZscalerc)<01>locator_unit_scaler5r6r<>sz-AutoDateFormatter.__call__.<locals>.<genexpr>z Unexpected type passed to {0!r}.)r?r<><00> _get_unit<69>AttributeError<6F>next<78>sortedr<64><00>itemsr<73>rzr{rr<>r<><00>callablerMrW)rdr]r<>rc<00>resultr5)r<>r6rhs

 zAutoDateFormatter.__call__)Nr<4E>)N)rirjrkrlrer<>rhr5r5r5r6r<00>s.
rc@sHeZdZddd<03>Zdd<05>Zdd<07>Zdd <09>Zdd d <0C>Zd d<0E>Zdd<10>Z dS)<13> rrulewrapperNcKs||d<||_|jf|<03>dS)N<>freq)<02> _base_tzinfo<66> _update_rrule)rdr<>r9<00>kwargsr5r5r6reszrrulewrapper.__init__cKs|j<00>|<01>|jf|j<00>dS)N)<03>
_construct<EFBFBD>updater<65>)rdr<>r5r5r6<00>sets zrrulewrapper.setcKs<>|j}d|krJ|d}|jdk rJ|dkr0|j}n
|<03>|<02>}|jdd<02>|d<d|kr<>|d}|jdk r<>|dk rx|<04>|<02>}ntd<04><01>|jdd<02>|d<|<01><05>|_||_tf|j<06>|_ dS)N<>dtstart)r9<00>untilz<until cannot be aware if dtstart is naive and tzinfo is None)
r<EFBFBD>r9r>rYrV<00>copyr<79><00>_tzinfor<00>_rrule)rdr<>r9r<>r<>r5r5r6r<>#s$


 
zrrulewrapper._update_rrulecCs$t|d<01>r|j|dd<03>S|j|d<04>S)N<>localizeT)<01>is_dst)r9)r<>r<>rY)rdrFr9r5r5r6<00>_attach_tzinfoBs
zrrulewrapper._attach_tzinfoFcsZ<00>jdkr<0E>S<00>fdd<03><08><01>fdd<05><08>|s<<3C><00><02>fdd<07>}n<10><00><02>fdd<07>}t<01><02><00>|<03>S) z>Decorator function that allows rrule methods to handle tzinfo.Ncs>t|tj<01>r:|jdk r:|j<02>jk r.|<00><04>j<03>}|jdd<01>S|S)N)r9)rzrAr9r<>r>rY)<01>arg)rdr5r6<00> normalize_argQs
   z9rrulewrapper._aware_return_wrapper.<locals>.normalize_argcs4t<00>fdd<02>|D<00><01>}<00>fdd<04>|<01><01>D<00>}||fS)Nc3s|]}<01>|<01>VqdS)Nr5)rxr<>)r<>r5r6r<>[szMrrulewrapper._aware_return_wrapper.<locals>.normalize_args.<locals>.<genexpr>csi|]\}}<02>|<02>|<01>qSr5r5)rx<00>kwr<77>)r<>r5r6<00>
<dictcomp>\szNrrulewrapper._aware_return_wrapper.<locals>.normalize_args.<locals>.<dictcomp>)<02>tupler<65>)<02>argsr<73>)r<>r5r6<00>normalize_argsZsz:rrulewrapper._aware_return_wrapper.<locals>.normalize_argscs&<00>||<01>\}}<01>||<01>}<02><02>|<02>j<01>S)N)r<>r<>)r<>r<>rF)<03>fr<66>rdr5r6<00>
inner_funccs
z6rrulewrapper._aware_return_wrapper.<locals>.inner_funccs*<00>||<01>\}}<01>||<01>}<02>fdd<02>|D<00>S)Ncsg|]}<01><00>|<01>j<01><02>qSr5)r<>r<>)rxrF)rdr5r6rykszJrrulewrapper._aware_return_wrapper.<locals>.inner_func.<locals>.<listcomp>r5)r<>r<>Zdts)r<>r<>rdr5r6r<>hs
)r<><00> functools<6C>wraps)rdr<><00> returns_listr<74>r5)r<>r<>r<>rdr6<00>_aware_return_wrapperIs
 z"rrulewrapper._aware_return_wrappercCsP||jkr|j|St|j|<01>}|dkr2|<00>|<02>S|dkrH|j|dd<04>S|SdS)N><00>after<65>before><00>between<65>xbefore<72>xafterT)r<>)<04>__dict__r=r<>r<>)rd<00>namer<65>r5r5r6<00> __getattr__os

 
zrrulewrapper.__getattr__cCs|j<00>|<01>dS)N)r<>r<>)rd<00>stater5r5r6<00> __setstate__|szrrulewrapper.__setstate__)N)F)
rirjrkrer<>r<>r<>r<>rrr5r5r5r6r<>s

& r<>c@sVeZdZdZdddd<03>Zddd<06>Zdd<08>Zd d
<EFBFBD>Zd d <0C>Zd d<0E>Z dd<10>Z
dd<12>Z dS)rz<>
Determines the tick locations when plotting dates.
This class is subclassed by other Locators and
is not meant to be used on its own.
r)<03>byhour<75>byminute<74>bysecondNcCs|dkrt<00>}||_dS)z5
*tz* is a :class:`tzinfo` instance.
N)r7r3)rdr3r5r5r6re<00>szDateLocator.__init__cCs
||_dS)z%
Set time zone info.
N)r3)rdr3r5r5r6r<><00>szDateLocator.set_tzinfocCsN|j<00><01>\}}||kr ||}}|dkr6td<02>|<01><01><01>t||j<05>t||j<05>fS)zA
Convert axis data interval to datetime objects.
r8z<>datalim minimum {} is less than 1 and is an invalid Matplotlib date value. This often happens if you pass a non-datetime value to an axis that has datetime units)<06>axis<69>get_data_intervalrVrWrr3)rd<00>dmin<69>dmaxr5r5r6<00> datalim_to_dt<64>s
zDateLocator.datalim_to_dtcCsN|j<00><01>\}}||kr ||}}|dkr6td<02>|<01><01><01>t||j<05>t||j<05>fS)zA
Converts the view interval to datetime objects.
r8z<>view limit minimum {} is less than 1 and is an invalid Matplotlib date value. This often happens if you pass a non-datetime value to an axis that has datetime units)r<00>get_view_intervalrVrWrr3)rd<00>vmin<69>vmaxr5r5r6<00> viewlim_to_dt<64>s
zDateLocator.viewlim_to_dtcCsdS)zj
Return how many days a unit of the locator is; used for
intelligent autoscaling.
r8r5)rdr5r5r6r<><00>szDateLocator._get_unitcCsdS)z;
Return the number of units for each tick.
r8r5)rdr5r5r6<00> _get_interval<61>szDateLocator._get_intervalcCsH|<00><00>}|<00><01>}t||<00>dkr@|d||8}|d||7}||fS)z<>
Given the proposed upper and lower extent, adjust the range
if it is too close to being singular (i.e. a range of ~0).
g<><67><EFBFBD><EFBFBD><EFBFBD>ư><3E>)r<>r<00>abs)rdr r <00>unit<69>intervalr5r5r6<00> nonsingular<61>s zDateLocator.nonsingular)N) rirjrkrl<00>hms0drer<>r
rr<>rrr5r5r5r6r<00>s 
rc@sJeZdZddd<03>Zdd<05>Zdd<07>Zdd <09>Zed
d <0B><00>Zd d <0A>Z dd<0F>Z
dS)r NcCst<00>||<02>||_dS)N)rre<00>rule)rd<00>or3r5r5r6re<00>s zRRuleLocator.__init__cCs2y|<00><00>\}}Wntk
r$gSX|<00>||<02>S)N)rrV<00> tick_values)rdrr r5r5r6rh<00>s
zRRuleLocator.__call__c Cs<>t||<01>}y ||}Wn ttfk
r6td<01>}YnXy ||}Wn ttfk
rdtd<02>}YnX|jj||d<03>|j<04>||d<04>}t|<06>dkr<>t||g<02>S|<00> t|<06><01>S)Ng<00>?g)<29><><EFBFBD><EFBFBD><EFBFBD>KA)r<>r<>Tr)
rrV<00> OverflowErrorr`rr<>r<>r<>rZraise_if_exceeds)rdr r r<><00>start<72>stop<6F>datesr5r5r6r<00>s
    zRRuleLocator.tick_valuescCs|jjj}|<00>|<01>S)zj
Return how many days a unit of the locator is; used for
intelligent autoscaling.
)rr<><00>_freq<65>get_unit_generic)rdr<>r5r5r6r<><00>s
zRRuleLocator._get_unitcCsh|tkr tS|tkrtS|tkr$tS|tkr0dS|tkr@dtS|t krPdt
S|t kr`dt SdSdS)Ng<00>?r<>) r
r<>r r<>r <00> DAYS_PER_WEEKr rr<>rr<>rrE)r<>r5r5r6r<00>szRRuleLocator.get_unit_genericcCs
|jjjS)N)rr<><00> _interval)rdr5r5r6rszRRuleLocator._get_intervalcCs<>|<00><00>\}}t||<01>}y ||}Wntk
r>td<01>}YnXy ||}Wntk
rhtd<02>}YnX|jj||d<03>|<00><00>\}}|j<04>|d<04>}|s<>|}|j<04>|d<04>}|s<>|}t|<06>}t|<07>}|<00> ||<07>S)z@
Set the view limits to include the data range.
g<00>?g)<29><><EFBFBD><EFBFBD><EFBFBD>KA)r<>r<>T)
r
rrVr`rr<>r<>r<>rr)rdrr r<>rrr r r5r5r6<00> autoscales* 
   zRRuleLocator.autoscale)N) rirjrkrerhrr<><00> staticmethodrrr!r5r5r5r6r <00>s
  r c@sZeZdZdZddd<06>Zdd<08>Zd d
<EFBFBD>Zd d <0C>Zd d<0E>Zdd<10>Z dd<12>Z
dd<14>Z dd<16>Z dS)r!z}
On autoscale, this class picks the best
:class:`DateLocator` to set the view limits and the tick
locations.
Nr<4E>Tc Cs<>t<00>||<01>t|d<01>|_t|_ttttt t
t g|_ ||_ tdtdtdtdt dt
dt di|_|dk r<>y|j<0E>|<03>Wn$tk
r<EFBFBD>t<11>|j |<03>|_YnX||_tdddd d
d d d dddddddddgtdddddgtddddddgtddddddgt dd d
ddgt
dd d
ddgt ddd d
d d dddddddddd d!d"d#gi|_|<04>rZddddddg|jt<dtdd$<24>tdd%<25>td&d'<27>td&d(<28>td&d(<28>dg|_dS))a<>
*minticks* is the minimum number of ticks desired, which is used to
select the type of ticking (yearly, monthly, etc.).
*maxticks* is the maximum number of ticks desired, which controls
any interval between ticks (ticking every other, every 3, etc.).
For really fine-grained control, this can be a dictionary mapping
individual rrule frequency constants (YEARLY, MONTHLY, etc.)
to their own maximum number of ticks. This can be used to keep
the number of ticks appropriate to the format chosen in
:class:`AutoDateFormatter`. Any frequency not specified in this
dictionary is given a default value.
*tz* is a :class:`tzinfo` instance.
*interval_multiples* is a boolean that indicates whether ticks
should be chosen to be multiple of the interval. This will lock
ticks to 'nicer' locations. For example, this will force the
ticks to be at hours 0,6,12,18 when hourly ticking is done at
6 hour intervals.
The AutoDateLocator has an interval dictionary that maps the
frequency of the tick (a constant from dateutil.rrule) and a
multiple allowed for that ticking. The default looks like this::
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],
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],
}
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::
locator = AutoDateLocator()
locator.intervald[HOURLY] = [3] # only show every 3 hours
)r3<00> <00> <00>Nr8r<00>r<><00>
rR<00>(<00>2r<><00><>i<>i<>i<>i<>i<>i<>i'r<>rf<00><00><00><00><00>i NiP<69>i<><69>i@ i <20>i@B<00> <00> r<00><00><)rrer"r<>r
rr r rrrr*<00>_freqs<71>minticks<6B>maxticksr<73>rM<00>dict<63>fromkeys<79>interval_multiples<65> intervaldr<64><00> _byranges)rdr3r5r6r9r5r5r6re?s80  

 
zAutoDateLocator.__init__cCs|<00><00>|<00><01>S)z!Return the locations of the ticks)<02>refreshr<68>)rdr5r5r6rh<00>szAutoDateLocator.__call__cCs|<00>||<02><02>||<02>S)N)<02> get_locatorr)rdr r r5r5r6r<00>szAutoDateLocator.tick_valuescCs(||kr |td}|td}||fS)Nr)r<>)rdr r r5r5r6r<00>s  zAutoDateLocator.nonsingularcCst<00>||<01>|j<02>|<01>dS)N)r<00>set_axisr<73>)rdrr5r5r6r><00>s zAutoDateLocator.set_axiscCs|<00><00>\}}|<00>||<02>|_dS)z5Refresh internal information based on current limits.N)rr=r<>)rdrr r5r5r6r<<00>s zAutoDateLocator.refreshcCs$|jtgkrdtSt<03>|j<00>SdS)Ng<00>?)rr*r[r r)rdr5r5r6r<><00>s zAutoDateLocator._get_unitcCs$|<00><00>\}}|<00>||<02>|_|j<02><03>S)z,Try to choose the view limits intelligently.)r
r=r<>r!)rdrr r5r5r6r!<00>s zAutoDateLocator.autoscalec Cs<>t||<01>}||}||kr&| }| }t|j<02>}|t|j}|j}|t|j}|t|j } t
<EFBFBD> |<04> <0C><00>}
t
<EFBFBD> |<04> <0C>d<00>} ||||| |
| g} dgddg} dddddddg}<0E>xt t|j| <0C><02>D]<5D>\}\}}||jkr<>d||<q<>x:|j|D]}|||j|dkr<>Pq<>Wt<13>d<08>|<12><01>||_|j|<00>r<>|j<18>r<>|j|dd|<12>||<|ttfk<06>r<>|d k<02>r|dd
g||<n|d k<02>r<>dd d
d g||<d}n|j|||<Pq<>Wtd<0E><01>|tk<02>r<>|j<18>r<>t||jd<0F>}nt| |<00>r |\}}}}}}}t|j||||||||d<10> }t ||j<1E>}n.t!||jd<0F>}|j"dk<04>rN|dk<00>rNt#<23>$d<13>|<13>%|j&<26>|j&dk <09>r<>|j'|j&<26>(<28><00>|j)|j&<26>*<2A><00>|S)z*Pick the best locator based on a distance.g<00><>.ATrfFNr8rz<>AutoDateLocator was unable to pick an appropriate interval for this date range. It may be necessary to add an interval value to the AutoDateLocator's intervald dictionary. Defaulting to {0}.r,r.r+r%<00>z=No sensible date limit could be found in the AutoDateLocator.)r3)rr<>r<><00>bymonth<74>
bymonthdayrrrrRi<>zwPlotting microsecond time intervals is not well supported. Please see the MicrosecondLocator documentation for details.)+rr?<00>years<72>MONTHS_PER_YEAR<41>monthsr<73>r<>r-<00> MIN_PER_HOURr,rJ<00>floorrD<00> enumerate<74>zipr4r5r:r6r<>Z_warn_externalrWrr;r9r r rVr
r"r3r<>r r)r<><00>_log<6F>warningr>r<00>set_view_intervalr <00>set_data_intervalr)rdrr r<>ZtdeltaZnumYearsZ numMonthsZnumDaysZnumHoursZ
numMinutesZ
numSecondsZnumMicroseconds<64>numsZuse_rrule_locatorZbyrangesr<73>r<>r<>rr<><00>_r@rArrrrr5r5r6r=<00>sn


 




  zAutoDateLocator.get_locator)Nr<4E>NT) rirjrkrlrerhrrr>r<r<>r!r=r5r5r5r6r!9s
Ur!c@s2eZdZdZd dd<05>Zdd<07>Zdd <09>Zd
d <0B>ZdS) r"z<>
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)
r8NcCsDt<00>||<04>t<02>|d<01>|_||dddd<02>|_t|d<03>s@||jd<dS)zh
Mark years that are multiple of base on a given month and day
(default jan 1).
r)<05>month<74>day<61>hour<75>minuter<65>r<>r9N)rre<00>tickerZ _Edge_integerrG<00>replacedr<64>)rdrGrOrPr3r5r5r6re2s 

zYearLocator.__init__cCs2y|<00><00>\}}Wntk
r$gSX|<00>||<02>S)N)rrVr)rdrr r5r5r6rhDs
zYearLocator.__call__cCs<>|j<00>|j<02>|jj}|j<00>|j<02>|jj}|jfd|i|j<06><02>}t|jd<02>rd|j sd|jj
|dd<04>}|g}xn|d}|j|kr<>t |<05>S|j|jj}|jfd|i|j<06><02>}t|jd<02>r<>|j s<>|jj
|dd<04>}|<05> |<06>qlWdS)Nr<4E>r<>T)r<>r<>) rG<00>ler<65>r<><00>gerYrTr<>r3r9r<>r<00>append)rdr r <00>ymin<69>ymax<61>ticksrFr<>r5r5r6rMs" 
 zYearLocator.tick_valuescCs<>|<00><00>\}}|j<01>|j<03>}|j<01>|j<03>}|jfd|i|j<06><02>}|<05>|j<08>}|jfd|i|j<06><02>}|<06>|j<08>}t |<05>}t |<06>}|<00>
||<06>S)z@
Set the view limits to include the data range.
r<>) r
rGrUr<>rVrYrTr>r3rr)rdrr rXrYr r r5r5r6r!fs   zYearLocator.autoscale)r8r8r8N)rirjrkrlrerhrr!r5r5r5r6r"&s
 
 r"c@seZdZdZddd<05>ZdS)r#zB
Make ticks on occurrences of each month, e.g., 1, 3, 12.
Nr8cCs`|dkrtdd<03>}n t|tj<03>r4dd<05>|<01>t<05>D<00>}ttf|||d<06>|j<08><02>}t <09>
|||<04>dS)a
Mark every month in *bymonth*; *bymonth* can be an int or
sequence. Default is ``range(1,13)``, i.e. every month.
*interval* is the interval between each iteration. For
example, if ``interval=2``, mark every second occurrence.
Nr8r0cSsg|] }|<01><00><00>qSr5)<01>item)rxr]r5r5r6ry<00>sz)MonthLocator.__init__.<locals>.<listcomp>)r@rAr) r<>rzrJr<>rIrUr<>r rr re)rdr@rArr3rr5r5r6re|s  
zMonthLocator.__init__)Nr8r8N)rirjrkrlrer5r5r5r6r#xsr#c@seZdZdZddd<05>ZdS)r$z4
Make ticks on occurrences of each weekday.
r8NcCsJt|tj<02>r dd<02>|<01>t<04>D<00>ttf||d<03>|j<07><02>}t<08> |||<03>dS)a<>
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 :mod:`dateutil.rrule`, which have been
imported into the :mod:`matplotlib.dates` namespace.
*interval* specifies the number of weeks to skip. For example,
``interval=2`` plots every second week.
cSsg|] }|<01><00><00>qSr5)r[)rxr]r5r5r6ry<00>sz+WeekdayLocator.__init__.<locals>.<listcomp>)<02> byweekdayrN)
rzrJr<>rIrUr<>r rr re)rdr\rr3rr5r5r6re<00>s
zWeekdayLocator.__init__)r8r8N)rirjrkrlrer5r5r5r6r$<00>sr$c@seZdZdZddd<05>ZdS)r%zZ
Make ticks on occurrences of each day of the month. For example,
1, 15, 30.
Nr8cCsz|t|<02>kr|dkrtd<02><01>|dkr0tdd<04>}n t|tj<05>rPdd<06>|<01>t<00>D<00>}ttf||d<07>|j <09><02>}t
<EFBFBD> |||<03>dS)z<>
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)``
r8z*interval must be an integer greater than 0Nr1cSsg|] }|<01><00><00>qSr5)r[)rxr]r5r5r6ry<00>sz'DayLocator.__init__.<locals>.<listcomp>)rAr) rUrVr<>rzrJr<>rIr<>r rr re)rdrArr3rr5r5r6re<00>s  zDayLocator.__init__)Nr8N)rirjrkrlrer5r5r5r6r%<00>sr%c@seZdZdZddd<05>ZdS)r&z1
Make ticks on occurrences of each hour.
Nr8cCs4|dkrtd<02>}tt||ddd<04>}t<03>|||<03>dS)a
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. For
example, if ``interval=2``, mark every second occurrence.
Nr2r)rrrr)r<>r<>rr re)rdrrr3rr5r5r6re<00>s

zHourLocator.__init__)Nr8N)rirjrkrlrer5r5r5r6r&<00>sr&c@seZdZdZddd<05>ZdS)r'z3
Make ticks on occurrences of each minute.
Nr8cCs2|dkrtd<02>}tt||dd<04>}t<03>|||<03>dS)a
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. For
example, if ``interval=2``, mark every second occurrence.
Nr3r)rrr)r<>r<>rr re)rdrrr3rr5r5r6re<00>s
zMinuteLocator.__init__)Nr8N)rirjrkrlrer5r5r5r6r'<00>sr'c@seZdZdZddd<05>ZdS)r(z3
Make ticks on occurrences of each second.
Nr8cCs0|dkrtd<02>}tt||d<03>}t<03>|||<03>dS)a
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. For
example, if ``interval=2``, mark every second occurrence.
Nr3)rr)r<>r<>rr re)rdrrr3rr5r5r6re<00>s zSecondLocator.__init__)Nr8N)rirjrkrlrer5r5r5r6r(<00>sr(c@sReZdZdZddd<05>Zdd<07>Zdd <09>Zd
d <0B>Zd d <0A>Zdd<0F>Z dd<11>Z
dd<13>Z dS)r)a<>
Make ticks on regular intervals of one or more microsecond(s).
.. note::
Due to the floating point representation of time in days since
0001-01-01 UTC (plus 1), plotting data with microsecond time
resolution does not work well with current dates.
If you want microsecond resolution time plots, it is strongly
recommended to use floating point seconds, not datetime-like
time representation.
If you really must use datetime.datetime() or similar and still
need microsecond precision, your only chance is to use very
early years; using year 0001 is recommended.
r8NcCs||_t<01>|<01>|_||_dS)z<>
*interval* is the interval between each iteration. For
example, if ``interval=2``, mark every second microsecond.
N)r rSZMultipleLocator<6F>_wrapped_locatorr3)rdrr3r5r5r6res zMicrosecondLocator.__init__cCs|j<00>|<01>t<02>||<01>S)N)r]r>r)rdrr5r5r6r>!s zMicrosecondLocator.set_axiscCs|j<00>||<02>t<02>|||<02>S)N)r]rKr)rdr r r5r5r6rK%sz$MicrosecondLocator.set_view_intervalcCs|j<00>||<02>t<02>|||<02>S)N)r]rLr)rdr r r5r5r6rL)sz$MicrosecondLocator.set_data_intervalcCs2y|<00><00>\}}Wntk
r$gSX|<00>||<02>S)N)rrVr)rdrr r5r5r6rh-s
zMicrosecondLocator.__call__cCs@t||f<02>\}}|t9}|t9}|j<02>||<04>}dd<02>|D<00>}|S)NcSsg|] }|t<00>qSr5)r[)rxZtickr5r5r6ry;sz2MicrosecondLocator.tick_values.<locals>.<listcomp>)rr[r]r)rdr r ZnminZnmaxrZr5r5r6r6s zMicrosecondLocator.tick_valuescCsdtS)zj
Return how many days a unit of the locator is; used for
intelligent autoscaling.
g<00>?)r[)rdr5r5r6r<>>szMicrosecondLocator._get_unitcCs|jS)z;
Return the number of units for each tick.
)r )rdr5r5r6rEsz MicrosecondLocator._get_interval)r8N) rirjrkrlrer>rKrLrhrr<>rr5r5r5r6r)s
 r)cCstt<01>|<00>tS)ze
Convert an epoch or sequence of epochs to the new date format,
that is days since 0001.
)<04> EPOCH_OFFSETrJr|rE)<01>er5r5r6rLsrcCst<00>|<00>ttS)zM
Convert days since 0001 to epoch. *d* can be a number or sequence.
)rJr|r^rE)rNr5r5r6rTsrcCs>d}t<00>|<00>sd}|g}tdd<04>|D<00><01>}|r6|dS|SdS)zi
Convert mx :class:`datetime` instance (or sequence of mx
instances) to the new date format.
FTcSsg|] }|<01><00><00>qSr5)rZ)rx<00>mr5r5r6rydszmx2num.<locals>.<listcomp>rN)rJr<>r)ZmxdatesZscalar<61>retr5r5r6r[s
rr<>c Cs|dkrdt}|t}|t}|}|t}|t}|t}||kr^tt||<00>|d<03>} d}
n<EFBFBD>||krvt|d<03>} d}
n<EFBFBD>||kr<>t|d<03>} d}
nz||kr<>t t
<EFBFBD> ||<00>|d<07>} d}
nV||kr<>t t
<EFBFBD> ||<00>|d<07>} d }
n2||kr<>t t
<EFBFBD> ||<00>|d<07>} d
}
nt |d<03>} d
}
t|
|d<03>} | | fS) z<>
Create a date locator with *numticks* (approx) and a date formatter
for *span* in days. Return value is (locator, formatter).
rr8)r3z%Yz%b %Yz %a, %b %d)rr3z%b %dz %H:%M
%b %dz%H:%M:%S)r<>r<>rr<>r<>r"rUr#r$r%<00>mathr<68>r&r'r) <0C>spanr3ZnumticksZminsZhrsr<73>ZwksrDrBr<>rcr<>r5r5r6<00>date_ticker_factoryks<


 rdcCs|tS)z!
Return seconds as days.
)rE)r4r5r5r6r+<00>sr+cCs|tS)z!
Return minutes as days.
)r<>)r`r5r5r6r,<00>sr,cCs|tS)z
Return hours as days.
)r<>)<01>hr5r5r6r-<00>sr-cCs|tS)z
Return weeks as days.
)r)<01>wr5r5r6r.<00>sr.c@s4eZdZdZedd<03><00>Zedd<05><00>Zedd<07><00>ZdS) <09> DateConverterz<72>
Converter for datetime.date and datetime.datetime data,
or for date/time data represented as it would be converted
by :func:`date2num`.
The 'unit' tag for such data is None or a tzinfo instance.
cCsL|}t|d<01>}t||d<01>}t<02>ddd<03>}t<02>ddd<03>}tj||d||fd<06>S)z<>
Return the :class:`~matplotlib.units.AxisInfo` for *unit*.
*unit* is a tzinfo instance or None.
The *axis* argument is required but not used.
)r3i<>r8i<>r<>)<04>majloc<6F>majfmt<6D>label<65>default_limits)r!rrAr:<00>units<74>AxisInfo)rrr3rhri<00>datemin<69>datemaxr5r5r6<00>axisinfo<66>s
 
zDateConverter.axisinfocCst|<00>S)z<>
If *value* is not already a number or sequence of numbers,
convert it with :func:`date2num`.
The *unit* and *axis* arguments are not used.
)r)r<>rrr5r5r6<00>convert<72>szDateConverter.convertc Cs\t|tj<02>r|<00><03>}yt<04>|<00>}Wnttfk
r:YnXy|jSt k
rVYnXdS)zT
Return the tzinfo instance of *x* or of its first element, or None
N)
rzrJr<>Zravelr<6C>Zsafe_first_elementrM<00> StopIterationr9r<>)r]rr5r5r6<00> default_units<74>s zDateConverter.default_unitsN)rirjrkrlr"rprqrsr5r5r5r6rg<00>s 
rgcs*eZdZdZd<08>fdd<05> Zdd<07>Z<05>ZS) <09>ConciseDateConverterz<72>
Converter for datetime.date and datetime.datetime data,
or for date/time data represented as it would be converted
by :func:`date2num`.
The 'unit' tag for such data is None or a tzinfo instance.
NTcs&||_||_||_||_t<04><00><05>dS)N)<06>_formats<74> _zero_formats<74>_offset_formats<74> _show_offsetrore)rdr<>r<>r<>r<>)rqr5r6re<00>s
zConciseDateConverter.__init__cCs\|}t|d<01>}t|||j|j|j|jd<02>}t<06>ddd<04>}t<06>ddd<04>}tj ||d||fd<07>S)z<>
Return the :class:`~matplotlib.units.AxisInfo` for *unit*.
*unit* is a tzinfo instance or None.
The *axis* argument is required but not used.
)r3)r3r<>r<>r<>r<>i<>r8i<>r<>)rhrirjrk)
r!rrurvrwrxrAr:rlrm)rdrrr3rhrirnror5r5r6rp<00>s



zConciseDateConverter.axisinfo)NNNT)rirjrkrlrerprtr5r5)rqr6rt<00>srt)N)N)N)Nr<4E>)~rlrAr<><00>loggingrbr<>rB<00>warningsZdateutil.rrulerrrrrrrr r
r r r rrrZdateutil.relativedeltarZdateutil.parserr2Z dateutil.tzZnumpyrJr1rZmatplotlib.unitsrlZmatplotlib.cbookr<6B>Zmatplotlib.tickerrS<00>__all__<5F> getLoggerrirIr/<00>utcr0r7r?r@r^r<>r*r<>rEZ SEC_PER_MINrCrr<>r<>r<>Z SEC_PER_HOURrEZ SEC_PER_WEEKr[<00>MONDAY<41>TUESDAY<41> WEDNESDAY<41>THURSDAY<41>FRIDAY<41>SATURDAY<41>SUNDAYZWEEKDAYSrHZ vectorizer<65>rQr`r<>r<><00>objectrbrmrvrwr~rrr<>r<>rr<>r<>rr<00> Formatterrrrrr<><00>Locatorrr r!r"r#r$r%r&r'r(r)rrrrdr+r,r-r.ZConversionInterfacergrt<00>registryrKr:r5r5r5r6<00><module><3E>s<>D     
  

(

'
%
* JhiPinRH
*9&