[SciPy-user] multiple windows in gplt

krivilli at unberwoot.net krivilli at unberwoot.net
Fri Oct 15 08:57:21 CDT 2004


HI,

Chris Fonnesbeck wrote:
> On Thu, 14 Oct 2004 20:40:18 -0500 (CDT), krivilli at unberwoot.net
> <krivilli at unberwoot.net> wrote:
>
>>-This is different then use time_series() two times for two different data
>>sets. Something like:
>>
>>class time_series(params,...):
>>    def __init__():
>>        .
>>        .
>>        .
>>
>>    def plot(data):
>>        #same code for ploting here
>>        .
>>        .
>>        .
>>
>>MyClass =  time_series(foo,...)
>>
>>MyClass.plot(data1)
>>MyClass.plot(data2)
>>
>>-This isn't quite the same.
>
>
> Actually, I only have one instance of a "Plotter" class, that gets
> passed around to objects that need it to plot for them. So it is more

-Still, would be a different scope. Hence different than the example i
gave which plots everthing on time_series() (no recursive).

-Using recursive code, gplt will open a pipe for gnuplot (i think it's
pipelined, not sure though) each time. The way it's now, is similar to
open more than one gnuplot interactive session.

-Using the method replot() (mentioned by Fernando Perez) would be a way to
do what u want or use the other example i gave u.

> like:
>
> class Plotter:
>
>     def plot(self, data):
>
> class Thing:
>
>     def plot(self, plotter):
>
>          plotter.plot(self.time_series)
>
> p = Plotter()
>
> t1 = Thing()
> t2 = Thing()
>
> t1.plot(p)
> t2.plot(p)
>


regards,

-- roberto  (krivilli)




More information about the SciPy-user mailing list