|
From: Skip M. <sk...@po...> - 2013-07-12 11:46:23
|
> Are you definately passing through datetime objects, or are you passing
> through the datetime "ordinals" / Julian time?
Definitely datetime objects:
if xtime:
min_x = datetime.datetime(9999, 12, 31, 23, 59, 59)
max_x = datetime.datetime(1970, 1, 1, 0, 0, 0)
def parse_x(x):
try:
return dateutil.parser.parse(x)
except ValueError:
print >> sys.stderr, "Can't parse", repr(x), "as a timestamp."
raise
...
You're suggesting that I shouldn't have to do anything with formatters
and locators if my X values are datetime objects? Maybe I should
simply scrub any locator/formatter initialization altogether. When I
first started this little tool I used a FuncFormatter which (unknown
to me) performed about like the AutoDateFormatter without the "Auto"
part. It simply selected the X axis format based on the range of the
data.
Skip
|