8000 Merge pull request #2725 from tacaswell/dates_doc_update · OceanWolf/matplotlib@fc07202 · GitHub
[go: up one dir, main page]

Skip to content

Commit fc07202

Browse files
committed
Merge pull request matplotlib#2725 from tacaswell/dates_doc_update
DOC : fixes small typos in matplotlib.dates docs
2 parents 400754f + 27d2bf8 commit fc07202

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/matplotlib/dates.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"""
33
Matplotlib provides sophisticated date plotting capabilities, standing on the
44
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
66
numbers which represent time in days since 0001-01-01 UTC, plus 1. For
77
example, 0001-01-01, 06:00 is 1.25, not 0.25. The helper functions
88
:func:`date2num`, :func:`num2date` and :func:`drange` are used to facilitate
@@ -50,6 +50,9 @@
5050
Most of the date tickers can locate single or multiple values. For
5151
example::
5252
53+
# import constants for the days of the week
54+
from matplotlib.dates import MO, TU, WE, TH, FR, SA, SU
55+
5356
# tick on mondays every week
5457
loc = WeekdayLocator(byweekday=MO, tz=tz)
5558
@@ -1028,7 +1031,8 @@ def __init__(self, byweekday=1, interval=1, tz=None):
10281031
sequence.
10291032
10301033
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.
10321036
10331037
*interval* specifies the number of weeks to skip. For example,
10341038
``interval=2`` plots every second week.

0 commit comments

Comments
 (0)
0