Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 504044e

Browse files
committed
Small expansions to docstrings in the date library.
Signed-off-by: Paul G <[email protected]>
1 parent 621a840 commit 504044e

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

lib/matplotlib/dates.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -609,6 +609,9 @@ def __getattr__(self, name):
609609

610610

611611
class DateLocator(ticker.Locator):
612+
"""
613+
Determines the tick locations when plotting dates.
614+
"""
612615
hms0d = {'byhour': 0, 'byminute': 0, 'bysecond': 0}
613616

614617
def __init__(self, tz=None):
@@ -620,13 +623,22 @@ def __init__(self, tz=None):
620623
self.tz = tz
621624

622625
def set_tzinfo(self, tz):
626+
"""
627+
Set time zone info.
628+
"""
623629
self.tz = tz
624630

625631
def datalim_to_dt(self):
632+
"""
633+
Convert axis data interval to datetime objects.
634+
"""
626635
dmin, dmax = self.axis.get_data_interval()
627636
return num2date(dmin, self.tz), num2date(dmax, self.tz)
628637

629638
def viewlim_to_dt(self):
639+
"""
640+
Converts the view interval to datetime objects.
641+
"""
630642
vmin, vmax = self.axis.get_view_interval()
631643
return num2date(vmin, self.tz), num2date(vmax, self.tz)
632644

0 commit comments

Comments
 (0)