Re: [Matplotlib-users] Format date tick labels

2012-10-12 Thread Mark Lawrence
On 13/10/2012 00:37, Ethan Gutmann wrote: > On Oct 12, 2012, at 4:15 PM, Mark Lawrence wrote: > >> On 12/10/2012 20:38, Ethan Gutmann wrote: >>> >>> I'm a little confused by this attitude. I recognize that there are issues >>> around dates, I've written a few date libraries myself to get around i

Re: [Matplotlib-users] Format date tick labels

2012-10-12 Thread Ethan Gutmann
On Oct 12, 2012, at 4:15 PM, Mark Lawrence wrote: > On 12/10/2012 20:38, Ethan Gutmann wrote: >> >> I'm a little confused by this attitude. I recognize that there are issues >> around dates, I've written a few date libraries myself to get around insane >> excel date issues (pop quiz for anyone

Re: [Matplotlib-users] Format date tick labels

2012-10-12 Thread Mark Lawrence
On 12/10/2012 20:38, Ethan Gutmann wrote: > > I'm a little confused by this attitude. I recognize that there are issues > around dates, I've written a few date libraries myself to get around insane > excel date issues (pop quiz for anyone at MS, was 1900 a leap year?) or just > to simplify APIs

Re: [Matplotlib-users] Format date tick labels

2012-10-12 Thread Benjamin Root
On Friday, October 12, 2012, Ethan Gutmann wrote: > > On Oct 11, 2012, at 2:58 PM, Benjamin Root wrote: > > > On Thu, Oct 11, 2012 at 4:53 PM, Mark Lawrence > 'breamore...@yahoo.co.uk');> > > wrote: > >> On 11/10/2012 10:55, Damon McDougall wrote: >> >> > Am I missing something here? Are seconds

Re: [Matplotlib-users] Format date tick labels

2012-10-12 Thread Ethan Gutmann
On Oct 11, 2012, at 2:58 PM, Benjamin Root wrote: > > On Thu, Oct 11, 2012 at 4:53 PM, Mark Lawrence > wrote: > On 11/10/2012 10:55, Damon McDougall wrote: > > > Am I missing something here? Are seconds just floats internally? A > > delta of 1e-6 is nothing (pardon the pun). A delta of 1e-9 is

Re: [Matplotlib-users] Format date tick labels

2012-10-11 Thread Damon McDougall
On Thursday, October 11, 2012, Benjamin Root wrote: > > > On Thu, Oct 11, 2012 at 4:53 PM, Mark Lawrence > 'breamore...@yahoo.co.uk');> > > wrote: > >> On 11/10/2012 10:55, Damon McDougall wrote: >> > On Wed, Oct 10, 2012 at 5:00 PM, Benjamin Root >> > > >> wrote: >> >> >> >> >> >> On Wed, Oct

Re: [Matplotlib-users] Format date tick labels

2012-10-11 Thread Benjamin Root
On Thu, Oct 11, 2012 at 4:53 PM, Mark Lawrence wrote: > On 11/10/2012 10:55, Damon McDougall wrote: > > On Wed, Oct 10, 2012 at 5:00 PM, Benjamin Root wrote: > >> > >> > >> On Wed, Oct 10, 2012 at 10:55 AM, Mark Lawrence < > breamore...@yahoo.co.uk> > >> wrote: > >>> > >>> On 10/10/2012 15:41, Ma

Re: [Matplotlib-users] Format date tick labels

2012-10-11 Thread Mark Lawrence
On 11/10/2012 10:55, Damon McDougall wrote: > On Wed, Oct 10, 2012 at 5:00 PM, Benjamin Root wrote: >> >> >> On Wed, Oct 10, 2012 at 10:55 AM, Mark Lawrence >> wrote: >>> >>> On 10/10/2012 15:41, Mark Lawrence wrote: On 10/10/2012 14:29, Benjamin Root wrote: > > I know of a few peopl

Re: [Matplotlib-users] Format date tick labels

2012-10-11 Thread Damon McDougall
On Wed, Oct 10, 2012 at 5:00 PM, Benjamin Root wrote: > > > On Wed, Oct 10, 2012 at 10:55 AM, Mark Lawrence > wrote: >> >> On 10/10/2012 15:41, Mark Lawrence wrote: >> > On 10/10/2012 14:29, Benjamin Root wrote: >> >> >> >> I know of a few people who have difficulties with matplotlib's datetime >

Re: [Matplotlib-users] Format date tick labels

2012-10-10 Thread Benjamin Root
On Wed, Oct 10, 2012 at 10:55 AM, Mark Lawrence wrote: > On 10/10/2012 15:41, Mark Lawrence wrote: > > On 10/10/2012 14:29, Benjamin Root wrote: > >> > >> I know of a few people who have difficulties with matplotlib's datetime > >> handling, but they are usually operating on the scale of milliseco

Re: [Matplotlib-users] Format date tick labels

2012-10-10 Thread Mark Lawrence
On 10/10/2012 15:41, Mark Lawrence wrote: > On 10/10/2012 14:29, Benjamin Root wrote: >> >> I know of a few people who have difficulties with matplotlib's datetime >> handling, but they are usually operating on the scale of milliseconds or >> less (lightning data), in which case, one is already at

Re: [Matplotlib-users] Format date tick labels

2012-10-10 Thread Mark Lawrence
On 10/10/2012 14:29, Benjamin Root wrote: > > I know of a few people who have difficulties with matplotlib's datetime > handling, but they are usually operating on the scale of milliseconds or > less (lightning data), in which case, one is already at the edge of the > resolution handled by python's

Re: [Matplotlib-users] Format date tick labels

2012-10-10 Thread Benjamin Root
On Mon, Oct 8, 2012 at 12:06 PM, Jianbao Tao wrote: > Thanks, Ben. > > Your fix works when the view interval is greater than 1 minute, but not so > much when the view interval is less than one minute. > > BTW, what I am trying to accomplish is to use matplotlib to plot > time-series data that can

Re: [Matplotlib-users] Format date tick labels

2012-10-08 Thread Jianbao Tao
Thanks, Ben. Your fix works when the view interval is greater than 1 minute, but not so much when the view interval is less than one minute. BTW, what I am trying to accomplish is to use matplotlib to plot time-series data that can be as long as several days and as short as a few milliseconds. So

Re: [Matplotlib-users] Format date tick labels

2012-10-08 Thread Benjamin Root
On Sun, Oct 7, 2012 at 6:47 PM, Jianbao Tao wrote: > fig = figure() > tsta = num2epoch(date2num(datetime.datetime.now())) > tarr = tsta + arange(0, 60*60*0.5, 0.1)# half hour, dt = > 0.1 sec > x = np.array(num2date(epoch2num(tarr))) > nt = len(tarr) > y = randn(nt) > > ax = fig.ad

[Matplotlib-users] Format date tick labels

2012-10-07 Thread Jianbao Tao
Hi, I am having trouble to customize the format of date axis tick labels. Below is a snippet to demonstrate my problem: #- code # Make an example plot. fig = figure() tsta = num2epoch(date2num(datetime.datetim