Re: [Matplotlib-users] dates for x-axis

2012-04-23 Thread questions anon
thanks for all the responses. still finding it very confusing!! but got it to work (without having to import in the loop). I used: from datetime import datetime as dt but I also had to call: from datetime import timedelta and now it seems to work nicely. thank you On Fri, Apr 20, 2012 at 3:36

Re: [Matplotlib-users] dates for x-axis

2012-04-19 Thread Goyo
El día 19 de abril de 2012 05:31, questions anon questions.a...@gmail.com escribió: Thank you, I was able to get it to work but only if I imported datetime within the loop, otherwise I ended up with the AttributeError: type object 'datetime.datetime' has no attribute 'datetime' and if I added

Re: [Matplotlib-users] dates for x-axis

2012-04-19 Thread Benjamin Root
On Thu, Apr 19, 2012 at 1:21 PM, Goyo goyod...@gmail.com wrote: El día 19 de abril de 2012 05:31, questions anon questions.a...@gmail.com escribió: Thank you, I was able to get it to work but only if I imported datetime within the loop, otherwise I ended up with the AttributeError: type

Re: [Matplotlib-users] dates for x-axis

2012-04-18 Thread questions anon
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. Any help will be greatly appreciated. import numpy as np import matplotlib.pyplot as plt

Re: [Matplotlib-users] dates for x-axis

2012-04-18 Thread questions anon
Thank you, I was able to get it to work but only if I imported datetime within the loop, otherwise I ended up with the AttributeError: type object 'datetime.datetime' has no attribute 'datetime' and if I added 'import datetime' at the top of my script it had an error where I loop through combining

Re: [Matplotlib-users] dates for x-axis

2012-04-12 Thread Goyo
El día 12 de abril de 2012 03:46, questions anon questions.a...@gmail.com escribió: I am not sure how to recognise that x-axis are dates like 20110101, 20110102, 20110103 etc. Use datetime objects instead of strings. Goyo

[Matplotlib-users] dates for x-axis

2012-04-11 Thread questions anon
Hi matplotlib list, I am having trouble applying mdates in matplotlib. I am not sure how to recognise that x-axis are dates like 20110101, 20110102, 20110103 etc. Any feedback will be greatly appreciated! below is the code I have so far: import numpy as np import matplotlib.pyplot as plt from