Mercurial > hg > octave-max
changeset 11366:ad8966096e27
bar.m: Improve the docstring.
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Tue, 14 Dec 2010 18:40:38 -0800 |
parents | 4b4d5a4d7d0e |
children | b2191ebea12f |
files | scripts/ChangeLog scripts/plot/bar.m |
diffstat | 2 files changed, 15 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,7 @@ +2010-12-14 Doug Stewart <doug.dastew@gmail.com> + + * plot/bar.m: Improve the docstring. + 2010-12-14 John W. Eaton <jwe@octave.org> * plot/private/__quiver__.m: Use high contrast color black for arrows
--- a/scripts/plot/bar.m +++ b/scripts/plot/bar.m @@ -26,7 +26,7 @@ ## @deftypefnx {Function File} {} bar (@var{h}, @dots{}) ## Produce a bar graph from two vectors of x-y data. ## -## If only one argument is given, it is taken as a vector of y-values +## If only one argument is given, @var{y}, it is taken as a vector of y-values ## and the x coordinates are taken to be the indices of the elements. ## ## The default width of 0.8 for the bars can be changed using @var{w}. @@ -54,9 +54,15 @@ ## changes the position on the base of all of the bar series. ## ## The optional input handle @var{h} allows an axis handle to be passed. -## Properties of the patch graphics object can be changed using -## @var{prop}, @var{val} pairs. +## +## The bargraph's appearance may be modified by specifying property/value +## pairs. The following example modifies the face and edge colors. ## +## @example +## bar (randn (1, 100), "facecolor", "r", "edgecolor", "b") +## @end example +## +## @noindent ## The color of the bars is taken from the figure's colormap, such that ## ## @example @@ -67,8 +73,8 @@ ## @end example ## ## @noindent -## will change the colors used for the bars. If you wish to force the bars to -## particular colors, this can be achieved like +## will change the colors used for the bars. The color of bars can also be set +## manually using the "facecolor" property as shown below. ## ## @example ## @group