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