Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1cd2ddc

Browse filesBrowse files
committed
make interval_multiples work for years
1 parent 2fd479a commit 1cd2ddc
Copy full SHA for 1cd2ddc

File tree

Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed

‎lib/matplotlib/dates.py

Copy file name to clipboardExpand all lines: lib/matplotlib/dates.py
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1189,15 +1189,15 @@ def get_locator(self, dmin, dmax):
11891189
else:
11901190
byranges[i] = self._byranges[i]
11911191

1192-
# We found what frequency to use
11931192
break
11941193
else:
11951194
raise ValueError('No sensible date limit could be found in the '
11961195
'AutoDateLocator.')
11971196

1198-
if use_rrule_locator[i]:
1197+
if (freq == YEARLY) and self.interval_multiples:
1198+
locator = YearLocator(interval)
1199+
elif use_rrule_locator[i]:
11991200
_, bymonth, bymonthday, byhour, byminute, bysecond, _ = byranges
1200-
12011201
rrule = rrulewrapper(self._freq, interval=interval,
12021202
dtstart=dmin, until=dmax,
12031203
bymonth=bymonth, bymonthday=bymonthday,

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.