Re: [Matplotlib-users] basic understanding of plotting dates

2007-09-05 Thread C M
On 9/4/07, Eric Firing [EMAIL PROTECTED] wrote: C M wrote: I realize that the clearer question (and one which ties into my original thread) is: do I need pylab to do plot_date()? No, plot_date is available as an axes method. Most pylab plotting commands are thin wrappers for axes

Re: [Matplotlib-users] basic understanding of plotting dates

2007-09-05 Thread Mark Bakker
= DateFormatter('%Y-%m-%d') p.gca().xaxis.set_major_formatter(y) p.draw() Mark From: C M [EMAIL PROTECTED] Subject: [Matplotlib-users] basic understanding of plotting dates x = (2007-09-01 12:00:02, 2007-09-02 12:00:02, 2007-09-03 12:00:02) y = (10, 20, 30

Re: [Matplotlib-users] basic understanding of plotting dates

2007-09-05 Thread Eric Firing
C M wrote: [...] So basically I need to use plot_date but in a figure embedded in a wxPython app. Still not sure how this should be written. To make it simple, this plot() command works in my app already: x = [1,2,3] y = [10,20,30] self.subplot.plot(x, y) I don't understand--where

Re: [Matplotlib-users] basic understanding of plotting dates

2007-09-05 Thread C M
x = [1,2,3] y = [10,20,30] self.subplot.plot(x, y) I don't understand--where did self come from? Sorry--self here refers to an instance of a wxPanel class in my wxPython app. It is the parent window for the mpl subplot which is meant to be a child of it. The subplot is itself a child of a

Re: [Matplotlib-users] basic understanding of plotting dates

2007-09-05 Thread Eric Firing
C M wrote: x = [1,2,3] y = [10,20,30] self.subplot.plot(x, y) I don't understand--where did self come from? Sorry--self here refers to an instance of a wxPanel class in my wxPython app. It is the parent window for the mpl subplot which is meant to be a

Re: [Matplotlib-users] basic understanding of plotting dates

2007-09-04 Thread Bill Dandreta
C M wrote: 1. What exactly must I import (which modules) and how do I import them (in the sense of import x vs. from x import y)? 2. What arguments does the plot_date() command take and what is format of the arguments? 3. Do I have to make the conversion from the date format above to the

Re: [Matplotlib-users] basic understanding of plotting dates

2007-09-04 Thread Mark Bakker
().xaxis.set_major_formatter(y) p.draw() Mark From: C M [EMAIL PROTECTED] Subject: [Matplotlib-users] basic understanding of plotting dates x = (2007-09-01 12:00:02, 2007-09-02 12:00:02, 2007-09-03 12:00:02) y = (10, 20, 30

Re: [Matplotlib-users] basic understanding of plotting dates

2007-09-04 Thread John Hunter
On 9/4/07, Brendan Barnwell [EMAIL PROTECTED] wrote: Incidentally, is there a reason why matplotlib can't just handle datetime objects itself? The requirement of having to manually convert them to an ad-hoc matplotlib format (which is just an integer) seems rather obtuse. It can

Re: [Matplotlib-users] basic understanding of plotting dates

2007-09-04 Thread Brendan Barnwell
Bill Dandreta wrote: C M wrote: 1. What exactly must I import (which modules) and how do I import them (in the sense of import x vs. from x import y)? 2. What arguments does the plot_date() command take and what is format of the arguments? 3. Do I have to make the conversion from the date

Re: [Matplotlib-users] basic understanding of plotting dates

2007-09-04 Thread C M
= DateFormatter('%Y-%m-%d') p.gca().xaxis.set_major_formatter(y) p.draw() Mark From: C M [EMAIL PROTECTED] Subject: [Matplotlib-users] basic understanding of plotting dates x = (2007-09-01 12:00:02, 2007-09-02 12:00:02, 2007-09-03 12:00:02) y = (10, 20, 30

Re: [Matplotlib-users] basic understanding of plotting dates

2007-09-04 Thread C M
] Subject: [Matplotlib-users] basic understanding of plotting dates x = (2007-09-01 12:00:02, 2007-09-02 12:00:02, 2007-09-03 12:00:02) y = (10, 20, 30) - This SF.net email is sponsored by: Splunk Inc. Still

Re: [Matplotlib-users] basic understanding of plotting dates

2007-09-04 Thread Eric Firing
C M wrote: Mark, Mark, Brendan, John, thanks for the input. I have a related question that may help to continue to clear things up for me. My goal is to use matplotlib with wxPython, and I've been able to embed graphs in wxPython apps fine so far (in this case, directly, not using wxMPL).

Re: [Matplotlib-users] basic understanding of plotting dates

2007-09-04 Thread Eric Firing
C M wrote: I realize that the clearer question (and one which ties into my original thread) is: do I need pylab to do plot_date()? No, plot_date is available as an axes method. Most pylab plotting commands are thin wrappers for axes methods. Eric

[Matplotlib-users] basic understanding of plotting dates

2007-09-03 Thread C M
This is really basic stuff but I had some problems navigating in the matplotlib website (*if anyone is interested, I'll list those issues at the end). I want to simply plot dates. After reading the tutorial, I just don't understand how to do it. I will have lists of dates in the format like