[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
dumb terminal problems (re: Octave on Mac)
From: |
Paul Kienzle |
Subject: |
dumb terminal problems (re: Octave on Mac) |
Date: |
Sun, 8 Jul 2007 23:33:02 -0400 |
On Jul 8, 2007, at 12:30 AM, address@hidden wrote:
Another thing is that octave.app has been prepared to work like you
say, but just putting gnuplot into /Applications - don't know if this
is all that has to be done for that gnuplot package. Try this from
your Terminal.app
bash$ which gnuplot
if it then says something like 'gnuplot not found' then you need to
set up that package somehow different. *Maybe* something like an
'export PATH=$PATH:/<path to your gnuplot binary>' will help?!
It seems the above will not help. The binary inside the package
(gnuplot-version.app/Contents/MacOS/gnupolt-version) does not appear to
be compiled to accept input from stdin. Rather, it launches a console
interface to gnuplot. There is an included binary to pass scripts to
this
app. I tried making this interface binary gnuplot, and calling
plot(y) from Octave, but this only activated the program with the
console and what appeared to be a blank editor page.
I tried passing arguments to the binary inside the app, but that also
was to no avail, just giving me the new console with a prompt waiting
for input.
In the drawnow.m file
(octave.app/Contents/Resources/share/octave/2.9.12/m/plot/drawnow.m) I
see the following:
if (nargin == 3)
fprintf (plot_stream, "set terminal %s\n;", term);
fprintf (plot_stream, "set output \"%s\"\n;", file);
elseif (isunix () && isempty (getenv ("DISPLAY")))
fprintf (plot_stream, "set terminal dumb\n;");
elseif (! isempty (h) && strcmp (getenv ("GNUTERM"), "wxt"))
fprintf (plot_stream, "set terminal wxt title \"Figure %d\";\n",
h);
endif
The problem goes away if I replace this with:
if (nargin == 3)
fprintf (plot_stream, "set terminal %s\n;", term);
fprintf (plot_stream, "set output \"%s\"\n;", file);
endif
It seems reasonable to me to let the native gnuplot decide what kind of
default terminal it wants, along with documenting that ~/.gnuplot can
have a "set term mydefaultterminal" command.
--
Knowing that 'set terminal dumb' is being done as the first command to
plot stream, I figured that I would be able to reset the terminal to
aqua after the first plot and have every thing work fine thereafter.
Unfortunately this is not the case. The sequence:
plot(1:10);
__gnuplot_raw__("set term aqua; plot sin(x)\n")
plot(1:10);
__gnuplot_raw__("plot atan(x)\n");
shows the plot types ascii, aqua, ascii then aqua again. I have no
idea what is going on.
- Paul
- Octave on Mac, Ramanarayan Hariharaputran, 2007/07/06
- Re: Octave on Mac, Thomas Treichl, 2007/07/06
- Fwd: Octave on Mac, Ramanarayan Hariharaputran, 2007/07/06
- Re: Fwd: Octave on Mac, Thomas Treichl, 2007/07/06
- Re: Fwd: Octave on Mac, poti, 2007/07/07
- Re: Fwd: Octave on Mac, poti, 2007/07/08
- Re: Octave on Mac, Paul Kienzle, 2007/07/08
- dumb terminal problems (re: Octave on Mac),
Paul Kienzle <=
- Re: dumb terminal problems (re: Octave on Mac), poti, 2007/07/10
- Re: dumb terminal problems (re: Octave on Mac), Paul Kienzle, 2007/07/10