# HG changeset patch # User David Bateman # Date 1272281233 -7200 # Node ID 148559d9d4aca11aef05b4ed65753f6a2ec2f4d9 # Parent 2ceb8e013597d6238465594a35b1b7e5370ae34a Document the use of the colormap for bar plots diff -r 2ceb8e013597 -r 148559d9d4ac scripts/ChangeLog --- 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 + + * plot/bar.m: Document the use of the colormap for the color of + the bars. + 2010-04-24 David Bateman * plot/private/__patch__.m: Correct order of calling setdata and diff -r 2ceb8e013597 -r 148559d9d4ac scripts/plot/bar.m --- 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