Skip to content

Commit 64b67c4

Browse files
committed
fixed mx2num bug
svn path=/trunk/matplotlib/; revision=913
1 parent 1b29e57 commit 64b67c4

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

CHANGELOG

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
New entries should be added at the top
22

3-
2005-02-02 Incorporated Fernando's matshow
3+
2005-02-02 Fixed a bug in dates mx2num - JDH
4+
5+
2005-02-02 Incorporated Fernando's matshow - JDH
46

57
2005-02-01 Added Fernando's figure num patch, including experemental
68
support for pylab backend switching, LineCOllection.color

lib/matplotlib/dates.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -576,15 +576,15 @@ def num2epoch(d):
576576
spd = 24.*3600.
577577
return (asarray(d)-719163)*spd
578578

579-
def mx2num(m):
579+
def mx2num(mxdates):
580580
"""
581581
Convert mx datetime instance (or sequence of mx instances) to the
582582
new date format,
583583
"""
584584
scalar = False
585-
if not iterable(m):
585+
if not iterable(mxdates):
586586
scalar = True
587-
m = [m]
587+
mxdates = [mxdates]
588588
ret = epoch2num([m.ticks() for m in mxdates])
589589
if scalar: return ret[0]
590590
else: return ret

0 commit comments

Comments
 (0)