On Nov 25, 2010, at 9:56 AM, Paul Schanda wrote:
Hi Ben,
Sorry, I did not understand you properly in the beginning. I tried the command
within octave, which is probably what you meant. The result is: empty. Neither
X11 nor aqua
octave:1> getenv ("GNUPLOT")
ans =
Thus, I tried to set it to aqua. Nonetheless, plotting does not work:
octave:4> setenv ("GNUPLOT","aqua")
octave:5> getenv ("GNUPLOT")
ans = aqua
octave:6> a=[1 2 3]
a =
1 2 3
octave:7> plot(a)
octave:8>
Again, no gnuplot opens....
Paul
Am 25.11.2010 um 15:29 schrieb Ben Abbott:
On Nov 25, 2010, at 4:09 AM, Paul Schanda wrote:
Hi there,
I have installed Octave and Gnuplot, using MacPorts, on my MacBook Pro.
The octave is version 3.2.4, gnuplot is Version 4.4 patch level 2.
Gnuplot's terminal type is set to 'aqua'.
I can start octave without problems and its functions seem to work.
However, when I try to plot something gnuplot is not started correctly.
I try the following:
octave:1> a=[1 2 3]
octave:2> plot(a)
These commands start up X11 as well as AquaTerm.
However, then nothing else happens.
octave goes back to a promt again:
octave:3>
No gnuplot window pops up, no graph coming... There are no error messages,
making it hard to know where to start.
I found that I have "gnuplot" in a couple of places,
because it apparently came
with some other Unix-type programs I am using (such as NMRPipe).
I am not sure whether this can make problems.
I have also tried to create an alias in my .cshrc,
such that I am sure that a command "gnuplot" points to the version
that I have installted together with octave.
Any ideas ?
By the way, I also find that I cannot cleanly exit octave.
It just gets stuck
and I have to quit the program with Ctrl-C.
Could this be related ?
Thanks
Paul
What does the following return?
getenv ("GNUTERM")
A proper result would be "x11" or "aqua".
Ben
To see which gnuplot Octave is trying to use, type ...
[status, output] = system (sprintf ("which %s", gnuplot_binary))
status = 0
output = /sw/bin/gnuplot
> From a terminal (a bash shell for example) try running the same gnuplot. If
gnuplot runs, then try a plot ...
set term aqua
plot sin(x)
I expect that you'll see a problem / error?
As you have other gnuplot's installed, I recommend you try each of them to
determine which ones do, and don't, function correctly.
You can instruct Octave to use any of the gnuplot's by using Octave's
"gnuplot_binary" function. For example, if you have a working install in
/usr/bin then ...
gnuplot_binary ("/usr/bin/gnuplot")
One final comment, as managing unix programs can be difficult, I recommend you
take a look at macports or fink. They each simiplify unix program management.
Ben
_______________________________________________
Help-octave mailing list
address@hidden
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave