[SciPy-user] multiple windows in gplt

krivilli at unberwoot.net krivilli at unberwoot.net
Thu Oct 14 19:27:59 CDT 2004

HI again,

> On Thu, 14 Oct 2004 19:51:03 -0400, Chris Fonnesbeck
> <fonnesbeck at gmail.com> wrote:
>> On Thu, 14 Oct 2004 15:25:16 -0500 (CDT), krivilli at unberwoot.net
>> <krivilli at unberwoot.net> wrote:
>> > HI,
>> >
>> > -Maybe what u're looking for is gplt.hold('on')
>> >
>> Thanks Roberto,
>> I tried that, but it simply displays the first plot of the series,
>> while subsequent plots are not shown. I need each plot to replace the
>> previous one in the same window.

-I did look your code again and there is another issue.

-You should also notice that u're calling gplt.plot recursively from
time_series(), so it will pop-up a new window every time it's called
(different scopes).

-What you could do is to plot 'just once', using a matrix. For example,
for a 2-D plot, say y(t) x t, u can store every new set of data in the
columns of matrix 't' (abscissas) and matrix 'y' (ordinates), and then
plot it ('t' and 'y' must have the same shape).

-Also, if u dont want gnuplot to flood u up, u can unset the option
'persist' (doesn't work on M$ Windows). For this u'll need to take look o
scipy/gplt/interface.py and scipy/gplt/pyPlot.py, cuz im not sure if u can
do it through gplt.

-I'm 'extending' gplt (not really, cuz it has all u need to add new
options) to use the rest of gnuplot options (like 'size ratio'). I'll
probably add something about the 'persist' flag.

> Here's the problem: calling save() or output() following plot()
> renders the window subsequently unusable. No further plots are
> rendered thereafter.
> I am looking to show a plot, save it to a file, then show another plot
> in the same window (*not* the same set of axes -- I need a new plot,
> but using the same gnunplot window). It appears that is not possible.

-At least, is it saving correctly?


-- roberto (krivilli)

More information about the SciPy-user mailing list