changeset 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 2ceb8e013597
children d8894a2d0a03
files scripts/ChangeLog scripts/plot/bar.m
diffstat 2 files changed, 26 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/ChangeLog	Mon Apr 26 07:21:26 2010 +0300
+++ b/scripts/ChangeLog	Mon Apr 26 13:27:13 2010 +0200
@@ -1,3 +1,8 @@
+2010-04-26  David Bateman  <dbateman@free.fr>
+
+	* plot/bar.m: Document the use of the colormap for the color of
+	the bars.
+
 2010-04-24  David Bateman  <dbateman@free.fr>
 
 	* plot/private/__patch__.m: Correct order of calling setdata and
--- 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