1 ## Copyright (C) 2008-2012 John W. Eaton
3 ## This file is part of Octave.
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.
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.
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/>.
20 ## @deftypefn {Loadable Function} {[@var{prog}, @var{args}] =} gnuplot_binary ()
21 ## @deftypefnx {Loadable Function} {[@var{old_prog}, @var{old_args}] =} gnuplot_binary (@var{new_prog}, @var{arg1}, @dots{})
22 ## Query or set the name of the program invoked by the plot command
23 ## when the graphics toolkit is set to "gnuplot". Additional arguments to
24 ## pass to the external plotting program may also be given.
25 ## The default value is @code{"gnuplot"} without additional arguments.
26 ## @xref{Installation}.
31 function [prog, args] = gnuplot_binary (new_prog, varargin)
33 persistent gp_binary = "gnuplot";
34 persistent gp_args = {};
36 if (nargout > 0 || nargin == 0)
42 if (ischar (new_prog))
43 if (! isempty (new_prog))
46 error ("gnuplot_binary: value must not be empty");
49 error ("gnuplot_binary: expecting program to be a character string");
54 if (iscellstr (varargin))
57 error ("gnuplot_binary: expecting arguments to be character strings");