1 ## Copyright (C) 1993-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 {Function File} {} ylabel (@var{string})
21 ## @deftypefnx {Function File} {} ylabel (@var{h}, @var{string})
22 ## @deftypefnx {Function File} {@var{h} =} ylabel (@dots{})
28 function retval = ylabel (varargin)
30 [h, varargin, nargin] = __plt_get_axis_arg__ ("ylabel", varargin{:});
32 if (rem (nargin, 2) != 1)
36 tmp = __axis_label__ (h, "ylabel", varargin{:},
37 "color", get (h, "ycolor"));
47 %! hf = figure ("visible", "off");
49 %! y = ylabel ("ylabel_string");
50 %! assert (get (gca, "ylabel"), y);
51 %! assert (get (y, "type"), "text");
52 %! assert (get (y, "visible"), "on");
53 %! assert (get (y, "string"), "ylabel_string");
54 %! unwind_protect_cleanup