From: Goyo <goy...@gm...> - 2012-04-18 16:52:51
|
El día 18 de abril de 2012 07:59, questions anon <que...@gm...> escribió: > I am not exactly sure how to use datetime objects instead of strings. > This is the code I am working with at the moment and the code works except > for the dates, they are just weird numbers along the x-axis. Seems like you're plotting yearmonthlist in the x axis, which is a list of strings and each string is the concatenation of the string representations of two numbers. So numbers in the x axis are to be expected. You can create datetime objects this way: d = datetime.datetime(year, month, 1) Then create an array of datetime objects and use it as the x parameter to plot. Goyo |