changeset 11351:bff585d759cf

improved the help text in hist.m
author Doug Stewart <doug.dastew@gmail.com>
date Mon, 13 Dec 2010 13:04:16 -0500
parents f6d15ae003b8
children 5ea2644b0111
files scripts/ChangeLog scripts/plot/hist.m
diffstat 2 files changed, 40 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/ChangeLog	Mon Dec 13 20:23:00 2010 +0100
+++ b/scripts/ChangeLog	Mon Dec 13 13:04:16 2010 -0500
@@ -1,3 +1,7 @@
+2010-12-13 Doug Stewart  <doug.dastew@gmail.com>
+
+       * plot/hist.m: Improved the help section.
+
 2010-12-13  Kai Habel  <kai.habel@gmx.de>
 
 	* plot/private/__add_default_menu__.m: New function.
--- a/scripts/plot/hist.m	Mon Dec 13 20:23:00 2010 +0100
+++ b/scripts/plot/hist.m	Mon Dec 13 13:04:16 2010 -0500
@@ -18,19 +18,25 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn {Function File} {} hist (@var{y}, @var{x}, @var{norm})
+## @deftypefn {Function File} {} hist (@var{y})
+## @deftypefnx {Function File} {} hist (@var{y}, @var{x})
+## @deftypefnx {Function File} {} hist (@var{y}, @var{nbins})
+## @deftypefnx {Function File} {} hist (@var{y}, @var{x}, @var{norm})
+## @deftypefnx {Function File} {[@var{nn}, @var{xx}] =} hist (@dots{})
+## @deftypefnx {Function File} {[@dots{}] =} hist (@dots{}, @var{prop}, @var{val})
+##
 ## Produce histogram counts or plots.
 ##
-## With one vector input argument, plot a histogram of the values with
-## 10 bins.  The range of the histogram bins is determined by the range
-## of the data.  With one matrix input argument, plot a histogram where
-## each bin contains a bar per input column.
+## With one vector input argument, @var{y}, plot a histogram of the values 
+## with 10 bins.  The range of the histogram bins is determined by the 
+## range of the data.  With one matrix input argument, @var{y}, plot a
+## histogram where each bin contains a bar per input column.
 ##
-## Given a second scalar argument, use that as the number of bins.
+## Given a second vector argument, @var{x}, use that as the centers of
+## the bins, with the width of the bins determined from the adjacent 
+## values in the vector.
 ##
-## Given a second vector argument, use that as the centers of the bins,
-## with the width of the bins determined from the adjacent values in
-## the vector.
+## If scaler, the second argument, @var{nbins}, defines the number of bins.
 ##
 ## If third argument is provided, the histogram is normalized such that
 ## the sum of the bars is equal to @var{norm}.
@@ -39,6 +45,27 @@
 ##
 ## With two output arguments, produce the values @var{nn} and @var{xx} such
 ## that @code{bar (@var{xx}, @var{nn})} will plot the histogram.
+##
+## The histogram's appearance may be modified by specifying property/value
+## pairs, @var{prop} and @var{val} pairs. For example the face and edge 
+## color may be modified.
+##
+## @example
+## @group
+## hist (randn (1, 100), 25, "facecolor", "r", "edgecolor", "b")
+## @end group
+## @end example
+##
+## @noindent
+## The histograms colors also depend upon the colormap.
+##
+## @example
+## @group
+## hist (rand (10, 3))
+## colormap (summer ())
+## @end group
+## @end example
+##
 ## @seealso{bar}
 ## @end deftypefn