[SciPy-user] multiple windows in gplt

Chris Fonnesbeck fonnesbeck at gmail.com
Fri Oct 15 09:22:49 EDT 2004


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
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)




More information about the SciPy-User mailing list