Mercurial > hg > octave-nkf
diff scripts/plot/ylabel.m @ 4:b4df021f796c
[project @ 1993-08-08 01:26:08 by jwe]
Initial revision
author | jwe |
---|---|
date | Sun, 08 Aug 1993 01:26:08 +0000 |
parents | |
children | 16a24e76d6e0 |
line wrap: on
line diff
new file mode 100644 --- /dev/null +++ b/scripts/plot/ylabel.m @@ -0,0 +1,22 @@ +function ylabel (text) + +# usage: ylabel (text) +# +# Defines a label for the y-axis of a plot. The label will appear the +# next time a plot is displayed. +# +# See also: plot, semilogx, semilogy, loglog, polar, mesh, contour, +# bar, stairs, gplot, gsplot, replot, xlabel, title + + if (nargin != 1) + error ("usage: ylabel (text)"); + endif + + if (isstr (text)) + command = sprintf ("set ylabel \"%s\"", text); + eval (command); + else + error ("error: ylabel: text must be a string"); + endif + +endfunction