Discussion:
Octave batch programs
(too old to reply)
Jens Benecke
2006-10-11 12:25:01 UTC
Permalink
Hello,

I use Octave 2.1.71 on Linux with Octave-Forcge 2006.03.17. I would like to
write an Octave script that I can connect with Touchstone format files on
my desktop so that when I click on them I get a graph displayed.

I have the script, and the file association, the only problem is that when I
open the files then I get a gnuplot window for a split-second and then it
vanishes.

1) How do I make the background Octave process keep the gnuplot window open?
2) Is there a way of providing additional options (scaling, etc) in the
Gnuplot window, or the ability to print? Or are there other output methods
that would allow this flexibility?

Thank you!
--
Jens Benecke
Please do not carbon copy me, I read the lists I post in!
Joseph Iacobucci
2006-10-11 23:24:17 UTC
Permalink
Jens,

One of the first things that came to mind was to use a "pause" statement
after the plot. for example,

x = linspace(1,100);
y = x;
plot(x,y)
pause

the only problem is that you have to hit a key in the octave window to end
the script.


I would also recommend checking out "-persist" in the gnuplot man page, it
looks promising.
--
Joseph Iacobucci
Post by Jens Benecke
Hello,
I use Octave 2.1.71 on Linux with Octave-Forcge 2006.03.17. I would like to
write an Octave script that I can connect with Touchstone format files on
my desktop so that when I click on them I get a graph displayed.
I have the script, and the file association, the only problem is that when I
open the files then I get a gnuplot window for a split-second and then it
vanishes.
1) How do I make the background Octave process keep the gnuplot window open?
2) Is there a way of providing additional options (scaling, etc) in the
Gnuplot window, or the ability to print? Or are there other output methods
that would allow this flexibility?
Thank you!
--
Jens Benecke
Please do not carbon copy me, I read the lists I post in!
Jens Benecke
2006-10-12 15:09:55 UTC
Permalink
Post by Joseph Iacobucci
Jens,
One of the first things that came to mind was to use a "pause" statement
after the plot. for example,
Hi,

thanks - this at least makes the plot visible. ;)
However when closing the plot there remain orphaned octave processes in the
background, which isn't exactly what I want.

I have also tried automatically printing to a PDF (or Postscript) and then
displaying that, which also seems to work, but not when I use subplots
(which I need often). This seems to be an Octave <-> GNUplot interaction
problem that has not been fixed yet.

Are there other (alternative, maybe even interactive) plotting frontends
available that Octave can use?
Post by Joseph Iacobucci
the only problem is that you have to hit a key in the octave window to end
the script.
I would also recommend checking out "-persist" in the gnuplot man page, it
looks promising.
This might help as well. I have to figure out how to set this from within
Octave.

Thank you! :)
--
Jens Benecke
Please do not carbon copy me, I read the lists I post in!
Pierre Asselin
2006-10-12 16:25:59 UTC
Permalink
Post by Jens Benecke
[ ... ]
I would also recommend checking out "-persist" in the gnuplot man page, it
looks promising.
This might help as well. I have to figure out how to set this from within
Octave.
You can do it from within gnuplot,
set term x11 persist

so you should be able to do it from octave by using "gset".
--
pa at panix dot com
Loading...