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
> 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
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--
Hey Che -
If you include your graphs in a wxPython app, you shouldn't use pylab.
Pylab is a wrapper to (quickly) generate graphs, and is very useful,
especially in interactive mode, as it saves a lot of typing and is much
easier to understand (indeed, a lot like matlab plotting). But for inclusion
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 a
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
-
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 wxMP
I realize that the clearer question (and one which ties into my original
thread) is: do I need pylab to do plot_date()?
On 9/4/07, C M <[EMAIL PROTECTED]> 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.
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). What I wanted
to
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 f
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.
Maybe this will get you going:
import pylab as p
import datetime as d
from matplotlib.dates import DateFormatter
t = [ d.datetime (2007,9,1,12), d.datetime(2007,9,2,12),
d.datetime(2007,9,3,12)
]
t = p.date2num(t)
p.plot_date( t, [10,20,30] )
p.xticks(t)
y = DateFormatter('%Y-%m-%d')
p.gca().xaxis
>>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 t
13 matches
Mail list logo