Discussion:
Mac OS X: Octave and Gnuplot> sh: gnuplot: command not found
Mark McClure
2008-04-23 15:46:43 UTC
Permalink
alias
gnuplot="/Applications/gnuplot/Gnuplot.app/Contents/Resources/bin/gnuplot"
alias
octave="/Applications/gnuplot/Octave.app/Contents/Resources/bin/octave"
Gnuplot plots very nicely. Octave runs and does all non-graphical things I
The alias command sets up a variable that applies only in your shell.
It won't help octave find gnuplot. You probably need to set up a symbolic
link to gnuplot in some directory on your path. Try:

ln -s /Applications/gnuplot/Gnuplot.app/Contents/Resources/bin/gnuplot \
/usr/local/bin/gnuplot

If this complains about permission precede this with a sudo and enter your
password when prompted.
--
View this message in context: http://www.nabble.com/Mac-OS-X%3A-Octave-and-Gnuplot%3E-sh%3A-gnuplot%3A-command-not-found-tp16833565p16834676.html
Sent from the Octave - General mailing list archive at Nabble.com.
John W. Eaton
2008-04-23 16:52:51 UTC
Permalink
On 23-Apr-2008, Mark McClure wrote:

|
|
| athale-rernat wrote:
| >
| >
| > I have added to my .profile file the following paths:
| > alias
| > gnuplot="/Applications/gnuplot/Gnuplot.app/Contents/Resources/bin/gnuplot"
| > alias
| > octave="/Applications/gnuplot/Octave.app/Contents/Resources/bin/octave"
| >
| > Gnuplot plots very nicely. Octave runs and does all non-graphical things I
| > tried at first shot. When I call plot commands, I get an error:
| >
| >
|
| The alias command sets up a variable that applies only in your shell.
| It won't help octave find gnuplot. You probably need to set up a symbolic
| link to gnuplot in some directory on your path. Try:
|
| ln -s /Applications/gnuplot/Gnuplot.app/Contents/Resources/bin/gnuplot \
| /usr/local/bin/gnuplot
|
| If this complains about permission precede this with a sudo and enter your
| password when prompted.

Or, add the directory containing gnuplot to your PATH before starting
Octave. In your .profile:

PATH=$PATH:/Applications/gnuplot/Gnuplot.app/Contents/Resources/bin

Or, use

gnuplot_binary ("/Applications/gnuplot/Gnuplot.app/Contents/Resources/bin/gnuplot");

in Octave. But probably setting PATH is better because then you can
also start Octave from the shell.

jwe
Thomas Treichl
2008-04-23 18:16:51 UTC
Permalink
Post by John W. Eaton
| >
| >
| > alias
| > gnuplot="/Applications/gnuplot/Gnuplot.app/Contents/Resources/bin/gnuplot"
| > alias
| > octave="/Applications/gnuplot/Octave.app/Contents/Resources/bin/octave"
| >
| > Gnuplot plots very nicely. Octave runs and does all non-graphical things I
|
| The alias command sets up a variable that applies only in your shell.
| It won't help octave find gnuplot. You probably need to set up a symbolic
|
| ln -s /Applications/gnuplot/Gnuplot.app/Contents/Resources/bin/gnuplot \
| /usr/local/bin/gnuplot
|
| If this complains about permission precede this with a sudo and enter your
| password when prompted.
Or, add the directory containing gnuplot to your PATH before starting
PATH=$PATH:/Applications/gnuplot/Gnuplot.app/Contents/Resources/bin
Or, use
gnuplot_binary ("/Applications/gnuplot/Gnuplot.app/Contents/Resources/bin/gnuplot");
in Octave. But probably setting PATH is better because then you can
also start Octave from the shell.
Ahem, sorry but the very best idea is to move Gnuplot.app into the /Applications
folder and not into a /Applications/gnuplot folder and let do Octave.app all the
rest for you that is necessary (ie. you don't set a alias, a path or
gnuplot_binary). BTW, all that (how to set up Gnuplot.app into a directory other
then /Applications if really necessary) is explained in the README.html file of
the octave-X.X.X-i386.dmg and octave-X.X.X-ppc.dmg virtual disc images... Please
have a look at it...

Thomas
athale-rernat
2008-04-24 12:11:54 UTC
Permalink
THANKS a lot- i had totally forgotten about the link in /usr/local/bin. That
works splendidly!
Cheers,
c.
Post by Mark McClure
alias
gnuplot="/Applications/gnuplot/Gnuplot.app/Contents/Resources/bin/gnuplot"
alias
octave="/Applications/gnuplot/Octave.app/Contents/Resources/bin/octave"
Gnuplot plots very nicely. Octave runs and does all non-graphical things I
The alias command sets up a variable that applies only in your shell.
It won't help octave find gnuplot. You probably need to set up a symbolic
ln -s /Applications/gnuplot/Gnuplot.app/Contents/Resources/bin/gnuplot \
/usr/local/bin/gnuplot
If this complains about permission precede this with a sudo and enter your
password when prompted.
--
View this message in context: http://www.nabble.com/Mac-OS-X%3A-Octave-and-Gnuplot%3E-sh%3A-gnuplot%3A-command-not-found-tp16833565p16850209.html
Sent from the Octave - General mailing list archive at Nabble.com.
Loading...