1 ## Copyright (C) 2002 Paul Kienzle <pkienzle@users.sf.net>
2 ## Copyright (C) 2005 Dmitri A. Sergatskov <dasergatskov@gmail.com>
3 ## Copyright (C) 2007 Russel Valentine
4 ## Copyright (C) 2007 Peter Gustafson
5 ## This program is in the public domain
8 ## @deftypefn {Function File} {} tics (@var{axis}, [@var{pos1}, @var{pos2}, @dots{}], [@var{lab1}, @var{lab2}, @dots{}],)
9 ## Explicitly set the tic positions and labels for the given axis.
11 ## @var{axis} must be 'x', 'y' or 'z'.
13 ## If no positions or labels are given, then restore the default.
14 ## If positions are given but no labels, use those positions with the
15 ## normal labels. If positions and labels are given, each position
16 ## labeled with the corresponding row from the label matrix.
20 function tics (axis, pos, lab)
22 if ( nargin < 1 || nargin > 3 )
27 if (t ~= "x" && t ~= "y" && t ~= "z")
28 error ("First input argument must be one of 'x', 'y' or 'z'");
32 set (gca(), [t, "tick"], []);
33 set (gca(), [t, "tickmode"], "auto");
34 set (gca(), [t, "ticklabel"], "");
35 set (gca(), [t, "ticklabelmode"], "auto");
37 set (gca(), [t, "tick"], pos);
38 set (gca(), [t, "ticklabel"], "");
39 set (gca(), [t, "ticklabelmode"], "auto");
41 set (gca(), [t, "tick"], pos);
42 set (gca(), [t, "ticklabel"], lab);
44 ## we should never get here anyway