# HG changeset patch
# User Doug Stewart
# Date 1292263456 18000
# Node ID 7db4464972d59cdf0d78141009516b6d84869829
# Parent 30f54b3b99532cfc9503d4fdfa33d0d7c632df72
improved the help text in hist.m
diff -r 30f54b3b9953 -r 7db4464972d5 scripts/ChangeLog
--- a/scripts/ChangeLog Sun Dec 12 21:58:30 2010 +0100
+++ b/scripts/ChangeLog Mon Dec 13 13:04:16 2010 -0500
@@ -1,3 +1,7 @@
+2010-12-13 Doug Stewart
+
+ * plot/hist.m: Improved the help section.
+
2010-12-12 Jaroslav Hajek
* optimization/optimget.m: Use explicit toupper conversion rather than
diff -r 30f54b3b9953 -r 7db4464972d5 scripts/plot/hist.m
--- a/scripts/plot/hist.m Sun Dec 12 21:58:30 2010 +0100
+++ b/scripts/plot/hist.m Mon Dec 13 13:04:16 2010 -0500
@@ -18,19 +18,25 @@
## .
## -*- 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} address@hidden, @var{xx}] =} hist (@dots{})
+## @deftypefnx {Function File} address@hidden =} 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.
+## Given a second scalar argument, @var{nbins}, use that as 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,25 @@
##
## With two output arguments, produce the values @var{nn} and @var{xx} such
## that @code{bar (@var{xx}, @var{nn})} will plot the histogram.
+##
+## With @var{prop} and @var{val} pairs, plot the histogram with different colors.
+##
+## @example
+## @group
+## hist (randn(1,100),25,"facecolor","r","edgecolor","b")
+## @end group
+## @end example
+##
+## @noindent
+## Also, changing the color map will change the colors of the histogram.
+##
+## @example
+## @group
+## hist (rand(10,3))
+## colormap (summer ())
+## @end group
+## @end example
+##
## @seealso{bar}
## @end deftypefn