# HG changeset patch # User carandraug # Date 1319730341 0 # Node ID acd134f8f6a6d92be17ca14af96ed2eead8978cf # Parent 12fdedde2fc36cd4f71fe2a45b1095dcb3da6f08 tics: help text to texinfo and start use of print_usage diff -r 12fdedde2fc3 -r acd134f8f6a6 main/plot/inst/tics.m --- a/main/plot/inst/tics.m Thu Oct 27 15:33:57 2011 +0000 +++ b/main/plot/inst/tics.m Thu Oct 27 15:45:41 2011 +0000 @@ -1,29 +1,26 @@ -## tics(axis,[pos1,pos2,...],['lab1';'lab2';...]) +## This program is in the public domain +## Authors: Paul Kienzle +## Dmitri A. Sergatskov +## Russel Valentine +## Peter Gustafson + +## -*- texinfo -*- +## @deftypefn {Function File} {} tics (@var{axis}, [@var{pos1}, @var{pos2}, @dots], [@var{lab1}, @var{lab2}, @dots],) +## Explicitly set the tic positions and labels for the given axis. ## -## Explicitly set the tic positions and labels for the given axis. +## @var{axis} must be 'x', 'y' or 'z'. ## ## If no positions or labels are given, then restore the default. ## If positions are given but no labels, use those positions with the -## normal labels. If positions and labels are given, each position +## normal labels. If positions and labels are given, each position ## labeled with the corresponding row from the label matrix. ## -## Axis is 'x', 'y' or 'z'. - -## This program is in the public domain -## Author: Paul Kienzle - -## Modified to use new gnuplot interface in octave > 2.9.0 -## Dmitri A. Sergatskov -## April 18, 2005 +## @end deftypefn -## Modifications which makes the y, z axis tics work. It was set to -## always do x axis before. -## 2007-08-12 Russel Valentine and Peter Gustafson +function tics (axis, pos, lab) -function tics (axis,pos,lab) - - if (nargin == 0) - usage ("tics(axis,[pos1,pos2,...],['lab1';'lab2';...])"); + if ( nargin < 1 || nargin > 3 ) + print_usage; endif t = lower (axis); @@ -44,7 +41,8 @@ set (gca(), [t, "tick"], pos); set (gca(), [t, "ticklabel"], lab); else - usage ("tics(axis,[pos1,pos2,...],['lab1';'lab2';...])"); + ## we should never get here anyway + print_usage; endif endfunction