MCPcopy Create free account
hub / github.com/ColdGrub1384/Pyto / tick_values

Method tick_values

site-packages/matplotlib/dates.py:1047–1067  ·  view source on GitHub ↗
(self, vmin, vmax)

Source from the content-addressed store, hash-verified

1045 return self.tick_values(dmin, dmax)
1046
1047 def tick_values(self, vmin, vmax):
1048 delta = relativedelta(vmax, vmin)
1049
1050 # We need to cap at the endpoints of valid datetime
1051 try:
1052 start = vmin - delta
1053 except (ValueError, OverflowError):
1054 start = _from_ordinalf(1.0)
1055
1056 try:
1057 stop = vmax + delta
1058 except (ValueError, OverflowError):
1059 # The magic number!
1060 stop = _from_ordinalf(3652059.9999999)
1061
1062 self.rule.set(dtstart=start, until=stop)
1063
1064 dates = self.rule.between(vmin, vmax, True)
1065 if len(dates) == 0:
1066 return date2num([vmin, vmax])
1067 return self.raise_if_exceeds(date2num(dates))
1068
1069 def _get_unit(self):
1070 """

Callers 1

__call__Method · 0.95

Calls 6

relativedeltaClass · 0.90
_from_ordinalfFunction · 0.85
date2numFunction · 0.85
raise_if_exceedsMethod · 0.80
setMethod · 0.45
betweenMethod · 0.45

Tested by

no test coverage detected