Re: [matplotlib-devel] date2num/num2date and ordinal date

2008-06-04 Thread John Hunter
On Wed, Jun 4, 2008 at 12:01 PM, Ted Drain <[EMAIL PROTECTED]> wrote: > Sorry - I don't think I was very clear in my email. Try this: > > import pylab as p > p.plot( [] () > p.gca().xaxis_date() > p.show() I did understand that in your first post, but I was focusing more on your comments about a

Re: [matplotlib-devel] date2num/num2date and ordinal date

2008-06-04 Thread Ted Drain
start thinking about possible solutions. Ted > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > John Hunter > Sent: Tuesday, June 03, 2008 1:51 PM > To: Ted Drain > Cc: Matplotlib > Subject: Re: [matplotlib-devel] date2num/nu

Re: [matplotlib-devel] date2num/num2date and ordinal date

2008-06-04 Thread Stephane Raynaud
Hi, On Tue, Jun 3, 2008 at 10:59 PM, Jeff Whitaker <[EMAIL PROTECTED]> wrote: > > There are alternate versions num2date and a date2num in basemap that handle > arbitrary calendars (not just 'proleptic gregorian') and arbitrary reference > times (not just 'days since 0001-01-01 00:00:00'). The doc

Re: [matplotlib-devel] date2num/num2date and ordinal date

2008-06-03 Thread Jeff Whitaker
Eric Firing wrote: > Stephane Raynaud wrote: > >> Hi, >> >> date2num and num2date perform conversion between datetime and 'days >> since 0001-01-01' and vice versa. >> For such task, they strictly use ordinal dates for their numeric days, >> 1 meaning '0001-01-01' by definition. >> Thus, date2n

Re: [matplotlib-devel] date2num/num2date and ordinal date

2008-06-03 Thread Eric Firing
the future, I'll put a little test case together to show > how the problems w/ not supporting a zero date show up in embedded plots. > > Ted > >> -Original Message- >> From: [EMAIL PROTECTED] >> [mailto:[EMAIL PROTECTED] On Behalf Of >> Eric Firing &g

Re: [matplotlib-devel] date2num/num2date and ordinal date

2008-06-03 Thread John Hunter
On Tue, Jun 3, 2008 at 3:41 PM, Ted Drain <[EMAIL PROTECTED]> wrote: > At some point in the future, I'll put a little test case together to show > how the problems w/ not supporting a zero date show up in embedded plots. Actually, when you pass in python datetime objects to mpl, we use the units

Re: [matplotlib-devel] date2num/num2date and ordinal date

2008-06-03 Thread Ted Drain
. Ted > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > Eric Firing > Sent: Tuesday, June 03, 2008 1:29 PM > To: Stephane Raynaud; John Hunter > Cc: Matplotlib > Subject: Re: [matplotlib-devel] date2num/num2date and ordinal date

Re: [matplotlib-devel] date2num/num2date and ordinal date

2008-06-03 Thread John Hunter
On Tue, Jun 3, 2008 at 3:29 PM, Eric Firing <[EMAIL PROTECTED]> wrote: > John, I suspect you wrote the dates module and use it heavily--what do you > think about the two methods of bringing the docstring and the behavior into > alignment? Any problem with fixing the behavior? The only thing I am

Re: [matplotlib-devel] date2num/num2date and ordinal date

2008-06-03 Thread Eric Firing
Stephane Raynaud wrote: > Hi, > > date2num and num2date perform conversion between datetime and 'days > since 0001-01-01' and vice versa. > For such task, they strictly use ordinal dates for their numeric days, > 1 meaning '0001-01-01' by definition. > Thus, date2num(datetime.datetime(1,1,1,0,0,0

[matplotlib-devel] date2num/num2date and ordinal date

2008-06-03 Thread Stephane Raynaud
Hi, date2num and num2date perform conversion between datetime and 'days since 0001-01-01' and vice versa. For such task, they strictly use ordinal dates for their numeric days, 1 meaning '0001-01-01' by definition. Thus, date2num(datetime.datetime(1,1,1,0,0,0)) return 1. which is supposed to mean