Le 16/09/2014 17:31, Xiaobo Yang a écrit :
> My X axis represents dates. When I used get_xlim(), I got something 
> like 735461.0 and 735490.5. What are these values? How can I convert 
> to python date objects?

Please, read the documentation of datetime.

Your data are *ordinals*, numbers which pack the data: year, month, etc. 
into one number ; the same strategy is used in spreadsheets, e.g., Excel.

If r=r=735461, then

datetime.fromordinal(r) gives: datetime.datetime(2014, 8, 16, 0, 0), 
unless I am mistaken...

==
This is the first approximation ... the "proleptic Gregorian ordinals" 
are integers. You have floats, and this probably is converted into 
fractions of a day / hour, etc. Read also something about timestamps.

Regards.

Jerzy Karczmarczuk


------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce.
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to