|
2 | 2 | """
|
3 | 3 | Matplotlib provides sophisticated date plotting capabilities, standing on the
|
4 | 4 | shoulders of python :mod:`datetime`, the add-on modules :mod:`pytz` and
|
5 |
| -:mod:`dateutils`. :class:`datetime` objects are converted to floating point |
| 5 | +:mod:`dateutil`. :class:`datetime` objects are converted to floating point |
6 | 6 | numbers which represent time in days since 0001-01-01 UTC, plus 1. For
|
7 | 7 | example, 0001-01-01, 06:00 is 1.25, not 0.25. The helper functions
|
8 | 8 | :func:`date2num`, :func:`num2date` and :func:`drange` are used to facilitate
|
|
50 | 50 | Most of the date tickers can locate single or multiple values. For
|
51 | 51 | example::
|
52 | 52 |
|
| 53 | + # import constants for the days of the week |
| 54 | + from matplotlib.dates import MO, TU, WE, TH, FR, SA, SU |
| 55 | +
|
53 | 56 | # tick on mondays every week
|
54 | 57 | loc = WeekdayLocator(byweekday=MO, tz=tz)
|
55 | 58 |
|
@@ -1028,7 +1031,8 @@ def __init__(self, byweekday=1, interval=1, tz=None):
|
1028 | 1031 | sequence.
|
1029 | 1032 |
|
1030 | 1033 | Elements of *byweekday* must be one of MO, TU, WE, TH, FR, SA,
|
1031 |
| - SU, the constants from :mod:`dateutils.rrule`. |
| 1034 | + SU, the constants from :mod:`dateutil.rrule`, which have been |
| 1035 | + imported into the :mod:`matplotlib.dates` namespace. |
1032 | 1036 |
|
1033 | 1037 | *interval* specifies the number of weeks to skip. For example,
|
1034 | 1038 | ``interval=2`` plots every second week.
|
|
0 commit comments