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

Skip to content

Commit 1e84e97

Browse files
committed
make autodateformatter customizable
svn path=/trunk/matplotlib/; revision=7513
1 parent dbfc19a commit 1e84e97

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

lib/matplotlib/dates.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -432,12 +432,9 @@ def __init__(self, locator, tz=None, defaultfmt='%Y-%m-%d'):
432432
def __call__(self, x, pos=0):
433433
scale = float( self._locator._get_unit() )
434434

435-
keys = self.scaled.keys()
436-
keys.sort()
437-
438435
fmt = self.defaultfmt
439436

440-
for k in keys:
437+
for k in sorted(self.scaled):
441438
if k>=scale:
442439
fmt = self.scaled[k]
443440
break

0 commit comments

Comments
 (0)