Mercurial > hg > octave-lyh
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 +++ b/scripts/ChangeLog @@ -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 +++ b/scripts/plot/bar.m @@ -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