I am trying to build timedeltas on the x axis, but I see strange behavior. With the following code, I would expect two graph curves:
dates = [datetime.datetime(2013,1,1) + datetime.timedelta(seconds=x**2) for x in range(1000)]
deltas = [datetime.timedelta(seconds=x**2) for x in range(1000)]
values = range(1000)
foo = DataFrame.from_dict({'dates': dates, 'deltas': deltas, 'vals': values})
foo.plot(x='dates', y='vals')
foo.plot(x='deltas', y='vals')
but in fact the second graph comes out as a straight line, since in this case the x axis is scaled. Is this a mistake or am I just doing it wrong?

source
share