annotate scripts/plot/gnuplot_binary.in @ 7361:a2870fd8ac58

[project @ 2008-01-12 07:50:54 by jwe]
author jwe
date Sat, 12 Jan 2008 07:50:55 +0000
parents
children ff8d7f3ad203
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7361
a2870fd8ac58 [project @ 2008-01-12 07:50:54 by jwe]
jwe
parents:
diff changeset
1 ## Copyright (C) 2008 John W. Eaton
a2870fd8ac58 [project @ 2008-01-12 07:50:54 by jwe]
jwe
parents:
diff changeset
2 ##
a2870fd8ac58 [project @ 2008-01-12 07:50:54 by jwe]
jwe
parents:
diff changeset
3 ## This file is part of Octave.
a2870fd8ac58 [project @ 2008-01-12 07:50:54 by jwe]
jwe
parents:
diff changeset
4 ##
a2870fd8ac58 [project @ 2008-01-12 07:50:54 by jwe]
jwe
parents:
diff changeset
5 ## Octave is free software; you can redistribute it and/or modify it
a2870fd8ac58 [project @ 2008-01-12 07:50:54 by jwe]
jwe
parents:
diff changeset
6 ## under the terms of the GNU General Public License as published by
a2870fd8ac58 [project @ 2008-01-12 07:50:54 by jwe]
jwe
parents:
diff changeset
7 ## the Free Software Foundation; either version 3 of the License, or (at
a2870fd8ac58 [project @ 2008-01-12 07:50:54 by jwe]
jwe
parents:
diff changeset
8 ## your option) any later version.
a2870fd8ac58 [project @ 2008-01-12 07:50:54 by jwe]
jwe
parents:
diff changeset
9 ##
a2870fd8ac58 [project @ 2008-01-12 07:50:54 by jwe]
jwe
parents:
diff changeset
10 ## Octave is distributed in the hope that it will be useful, but
a2870fd8ac58 [project @ 2008-01-12 07:50:54 by jwe]
jwe
parents:
diff changeset
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of
a2870fd8ac58 [project @ 2008-01-12 07:50:54 by jwe]
jwe
parents:
diff changeset
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
a2870fd8ac58 [project @ 2008-01-12 07:50:54 by jwe]
jwe
parents:
diff changeset
13 ## General Public License for more details.
a2870fd8ac58 [project @ 2008-01-12 07:50:54 by jwe]
jwe
parents:
diff changeset
14 ##
a2870fd8ac58 [project @ 2008-01-12 07:50:54 by jwe]
jwe
parents:
diff changeset
15 ## You should have received a copy of the GNU General Public License
a2870fd8ac58 [project @ 2008-01-12 07:50:54 by jwe]
jwe
parents:
diff changeset
16 ## along with Octave; see the file COPYING. If not, see
a2870fd8ac58 [project @ 2008-01-12 07:50:54 by jwe]
jwe
parents:
diff changeset
17 ## <http://www.gnu.org/licenses/>.
a2870fd8ac58 [project @ 2008-01-12 07:50:54 by jwe]
jwe
parents:
diff changeset
18
a2870fd8ac58 [project @ 2008-01-12 07:50:54 by jwe]
jwe
parents:
diff changeset
19 ## -*- texinfo -*-
a2870fd8ac58 [project @ 2008-01-12 07:50:54 by jwe]
jwe
parents:
diff changeset
20 ## @deftypefn {Loadable Function} {@var{val} =} gnuplot_binary ()
a2870fd8ac58 [project @ 2008-01-12 07:50:54 by jwe]
jwe
parents:
diff changeset
21 ## @deftypefnx {Loadable Function} {@var{old_val} =} gnuplot_binary (@var{new_val})
a2870fd8ac58 [project @ 2008-01-12 07:50:54 by jwe]
jwe
parents:
diff changeset
22 ## Query or set the name of the program invoked by the plot command.
a2870fd8ac58 [project @ 2008-01-12 07:50:54 by jwe]
jwe
parents:
diff changeset
23 ## The default value @code{\"gnuplot\"}. @xref{Installation}.
a2870fd8ac58 [project @ 2008-01-12 07:50:54 by jwe]
jwe
parents:
diff changeset
24 ## @end deftypefn
a2870fd8ac58 [project @ 2008-01-12 07:50:54 by jwe]
jwe
parents:
diff changeset
25
a2870fd8ac58 [project @ 2008-01-12 07:50:54 by jwe]
jwe
parents:
diff changeset
26 ## Author: jwe
a2870fd8ac58 [project @ 2008-01-12 07:50:54 by jwe]
jwe
parents:
diff changeset
27
a2870fd8ac58 [project @ 2008-01-12 07:50:54 by jwe]
jwe
parents:
diff changeset
28 function retval = gnuplot_binary (new_val)
a2870fd8ac58 [project @ 2008-01-12 07:50:54 by jwe]
jwe
parents:
diff changeset
29
a2870fd8ac58 [project @ 2008-01-12 07:50:54 by jwe]
jwe
parents:
diff changeset
30 persistent gp_binary = %OCTAVE_CONF_GNUPLOT%;
a2870fd8ac58 [project @ 2008-01-12 07:50:54 by jwe]
jwe
parents:
diff changeset
31
a2870fd8ac58 [project @ 2008-01-12 07:50:54 by jwe]
jwe
parents:
diff changeset
32 if (nargout > 0 || nargin == 0)
a2870fd8ac58 [project @ 2008-01-12 07:50:54 by jwe]
jwe
parents:
diff changeset
33 retval = gp_binary;
a2870fd8ac58 [project @ 2008-01-12 07:50:54 by jwe]
jwe
parents:
diff changeset
34 endif
a2870fd8ac58 [project @ 2008-01-12 07:50:54 by jwe]
jwe
parents:
diff changeset
35
a2870fd8ac58 [project @ 2008-01-12 07:50:54 by jwe]
jwe
parents:
diff changeset
36 if (nargin == 1)
a2870fd8ac58 [project @ 2008-01-12 07:50:54 by jwe]
jwe
parents:
diff changeset
37 if (ischar (new_val))
a2870fd8ac58 [project @ 2008-01-12 07:50:54 by jwe]
jwe
parents:
diff changeset
38 if (! isempty (new_val))
a2870fd8ac58 [project @ 2008-01-12 07:50:54 by jwe]
jwe
parents:
diff changeset
39 gp_binary = new_val;
a2870fd8ac58 [project @ 2008-01-12 07:50:54 by jwe]
jwe
parents:
diff changeset
40 else
a2870fd8ac58 [project @ 2008-01-12 07:50:54 by jwe]
jwe
parents:
diff changeset
41 error ("gnuplot_binary: value must not be empty");
a2870fd8ac58 [project @ 2008-01-12 07:50:54 by jwe]
jwe
parents:
diff changeset
42 endif
a2870fd8ac58 [project @ 2008-01-12 07:50:54 by jwe]
jwe
parents:
diff changeset
43 else
a2870fd8ac58 [project @ 2008-01-12 07:50:54 by jwe]
jwe
parents:
diff changeset
44 error ("gnuplot_binary: expecting arg to be a character string");
a2870fd8ac58 [project @ 2008-01-12 07:50:54 by jwe]
jwe
parents:
diff changeset
45 endif
a2870fd8ac58 [project @ 2008-01-12 07:50:54 by jwe]
jwe
parents:
diff changeset
46 elseif (nargin > 1)
a2870fd8ac58 [project @ 2008-01-12 07:50:54 by jwe]
jwe
parents:
diff changeset
47 print_usage ();
a2870fd8ac58 [project @ 2008-01-12 07:50:54 by jwe]
jwe
parents:
diff changeset
48 endif
a2870fd8ac58 [project @ 2008-01-12 07:50:54 by jwe]
jwe
parents:
diff changeset
49
a2870fd8ac58 [project @ 2008-01-12 07:50:54 by jwe]
jwe
parents:
diff changeset
50 endfunction