annotate scripts/plot/gnuplot_binary.in @ 10238:144739908eef

Really remove get_old_gnuplot_color
author David Bateman <dbateman@free.fr>
date Mon, 01 Feb 2010 20:19:54 +0100
parents 49f890499ebc
children fd0a3ac60b0e
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 -*-
9461
ff8d7f3ad203 gnuplot_binary.m: accept arguments in addition to program name
John W. Eaton <jwe@octave.org>
parents: 7361
diff changeset
20 ## @deftypefn {Loadable Function} {[@var{prog}, @var{args}] =} gnuplot_binary ()
9467
49f890499ebc fix typo in gnuplot_binary
Jaroslav Hajek <highegg@gmail.com>
parents: 9461
diff changeset
21 ## @deftypefnx {Loadable Function} {[@var{old_prog}, @var{old_args}] =} gnuplot_binary (@var{new_prog}, @var{arg1}, @dots{})
9461
ff8d7f3ad203 gnuplot_binary.m: accept arguments in addition to program name
John W. Eaton <jwe@octave.org>
parents: 7361
diff changeset
22 ## Query or set the name of the program invoked by the plot command
ff8d7f3ad203 gnuplot_binary.m: accept arguments in addition to program name
John W. Eaton <jwe@octave.org>
parents: 7361
diff changeset
23 ## and any arguments to pass to it. Previous arguments are returned
ff8d7f3ad203 gnuplot_binary.m: accept arguments in addition to program name
John W. Eaton <jwe@octave.org>
parents: 7361
diff changeset
24 ## as a cell array.
7361
a2870fd8ac58 [project @ 2008-01-12 07:50:54 by jwe]
jwe
parents:
diff changeset
25 ## The default value @code{\"gnuplot\"}. @xref{Installation}.
a2870fd8ac58 [project @ 2008-01-12 07:50:54 by jwe]
jwe
parents:
diff changeset
26 ## @end deftypefn
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 ## Author: jwe
a2870fd8ac58 [project @ 2008-01-12 07:50:54 by jwe]
jwe
parents:
diff changeset
29
9461
ff8d7f3ad203 gnuplot_binary.m: accept arguments in addition to program name
John W. Eaton <jwe@octave.org>
parents: 7361
diff changeset
30 function [prog, args] = gnuplot_binary (new_prog, varargin)
7361
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 persistent gp_binary = %OCTAVE_CONF_GNUPLOT%;
9461
ff8d7f3ad203 gnuplot_binary.m: accept arguments in addition to program name
John W. Eaton <jwe@octave.org>
parents: 7361
diff changeset
33 persistent gp_args = {};
7361
a2870fd8ac58 [project @ 2008-01-12 07:50:54 by jwe]
jwe
parents:
diff changeset
34
a2870fd8ac58 [project @ 2008-01-12 07:50:54 by jwe]
jwe
parents:
diff changeset
35 if (nargout > 0 || nargin == 0)
9461
ff8d7f3ad203 gnuplot_binary.m: accept arguments in addition to program name
John W. Eaton <jwe@octave.org>
parents: 7361
diff changeset
36 prog = gp_binary;
ff8d7f3ad203 gnuplot_binary.m: accept arguments in addition to program name
John W. Eaton <jwe@octave.org>
parents: 7361
diff changeset
37 args = gp_args;
7361
a2870fd8ac58 [project @ 2008-01-12 07:50:54 by jwe]
jwe
parents:
diff changeset
38 endif
a2870fd8ac58 [project @ 2008-01-12 07:50:54 by jwe]
jwe
parents:
diff changeset
39
a2870fd8ac58 [project @ 2008-01-12 07:50:54 by jwe]
jwe
parents:
diff changeset
40 if (nargin == 1)
9461
ff8d7f3ad203 gnuplot_binary.m: accept arguments in addition to program name
John W. Eaton <jwe@octave.org>
parents: 7361
diff changeset
41 if (ischar (new_prog))
ff8d7f3ad203 gnuplot_binary.m: accept arguments in addition to program name
John W. Eaton <jwe@octave.org>
parents: 7361
diff changeset
42 if (! isempty (new_prog))
ff8d7f3ad203 gnuplot_binary.m: accept arguments in addition to program name
John W. Eaton <jwe@octave.org>
parents: 7361
diff changeset
43 gp_binary = new_prog;
7361
a2870fd8ac58 [project @ 2008-01-12 07:50:54 by jwe]
jwe
parents:
diff changeset
44 else
a2870fd8ac58 [project @ 2008-01-12 07:50:54 by jwe]
jwe
parents:
diff changeset
45 error ("gnuplot_binary: value must not be empty");
a2870fd8ac58 [project @ 2008-01-12 07:50:54 by jwe]
jwe
parents:
diff changeset
46 endif
a2870fd8ac58 [project @ 2008-01-12 07:50:54 by jwe]
jwe
parents:
diff changeset
47 else
9461
ff8d7f3ad203 gnuplot_binary.m: accept arguments in addition to program name
John W. Eaton <jwe@octave.org>
parents: 7361
diff changeset
48 error ("gnuplot_binary: expecting program to be a character string");
7361
a2870fd8ac58 [project @ 2008-01-12 07:50:54 by jwe]
jwe
parents:
diff changeset
49 endif
9461
ff8d7f3ad203 gnuplot_binary.m: accept arguments in addition to program name
John W. Eaton <jwe@octave.org>
parents: 7361
diff changeset
50 endif
ff8d7f3ad203 gnuplot_binary.m: accept arguments in addition to program name
John W. Eaton <jwe@octave.org>
parents: 7361
diff changeset
51
ff8d7f3ad203 gnuplot_binary.m: accept arguments in addition to program name
John W. Eaton <jwe@octave.org>
parents: 7361
diff changeset
52 if (nargin > 1)
ff8d7f3ad203 gnuplot_binary.m: accept arguments in addition to program name
John W. Eaton <jwe@octave.org>
parents: 7361
diff changeset
53 if (iscellstr (varargin))
ff8d7f3ad203 gnuplot_binary.m: accept arguments in addition to program name
John W. Eaton <jwe@octave.org>
parents: 7361
diff changeset
54 gp_args = varargin;
ff8d7f3ad203 gnuplot_binary.m: accept arguments in addition to program name
John W. Eaton <jwe@octave.org>
parents: 7361
diff changeset
55 else
ff8d7f3ad203 gnuplot_binary.m: accept arguments in addition to program name
John W. Eaton <jwe@octave.org>
parents: 7361
diff changeset
56 error ("gnuplot_binary: expecting arguments to be character strings");
ff8d7f3ad203 gnuplot_binary.m: accept arguments in addition to program name
John W. Eaton <jwe@octave.org>
parents: 7361
diff changeset
57 endif
7361
a2870fd8ac58 [project @ 2008-01-12 07:50:54 by jwe]
jwe
parents:
diff changeset
58 endif
a2870fd8ac58 [project @ 2008-01-12 07:50:54 by jwe]
jwe
parents:
diff changeset
59
a2870fd8ac58 [project @ 2008-01-12 07:50:54 by jwe]
jwe
parents:
diff changeset
60 endfunction