diff scripts/plot/bar.m @ 10572:148559d9d4ac

Document the use of the colormap for bar plots
author David Bateman <dbateman@free.fr>
date Mon, 26 Apr 2010 13:27:13 +0200
parents 16f53d29049f
children fbd7843974fa
line wrap: on
line diff
--- a/scripts/plot/bar.m	Mon Apr 26 07:21:26 2010 +0300
+++ b/scripts/plot/bar.m	Mon Apr 26 13:27:13 2010 +0200
@@ -57,6 +57,27 @@
 ## Properties of the patch graphics object can be changed using
 ## @var{prop}, @var{val} pairs.
 ##
+## The color of the bars is taken from the figure's colormap, such that
+##
+## @example
+## @group
+## bar (rand(10,3))
+## colormap (summer ())
+## @end group
+## @end example
+##
+## will change the colors used for the bars. If you wish to force the bars to
+## particular colors, this can be achieved like
+##
+## @example
+## @group
+## h = bar (rand(10,3))
+## set (h(1), "facecolor", "r")
+## set (h(2), "facecolor", "g")
+## set (h(3), "facecolor", "b")
+## @end group
+## @end example
+##
 ## @seealso{barh, plot} 
 ## @end deftypefn