Mercurial > hg > octave-shane
changeset 6509:84f2d0253aea
[project @ 2007-04-09 19:12:10 by jwe]
author | jwe |
---|---|
date | Mon, 09 Apr 2007 19:12:10 +0000 |
parents | 184ab67c3bc1 |
children | cbae86745c5b |
files | scripts/ChangeLog scripts/plot/stem.m src/ChangeLog src/graphics.cc |
diffstat | 4 files changed, 40 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,8 @@ +2007-04-09 Daniel J Sebald <daniel.sebald@ieee.org> + + * plot/stem.m: Fix typos in doc string. Fix typo in call to + zeros. Set markerfacecolor property in call to plot. + 2007-04-06 John W. Eaton <jwe@octave.org> * linear-algebra/norm.m: Use new __vnorm__ function for vector args.
--- a/scripts/plot/stem.m +++ b/scripts/plot/stem.m @@ -30,7 +30,7 @@ ## stem (x); ## @end example ## @noindent -## plots 10 stems with hights from 1 to 10; +## plots 10 stems with heights from 1 to 10; ## ## @example ## x = 1:10; @@ -38,7 +38,7 @@ ## stem (x, y); ## @end example ## @noindent -## plots 10 stems with hights from 2 to 20; +## plots 10 stems with heights from 2 to 20; ## ## @example ## x = 1:10; @@ -46,7 +46,7 @@ ## h = stem (x, y, "b"); ## @end example ## @noindent -## plots 10 bars with hights from 2 to 20 +## plots 10 bars with heights from 2 to 20 ## (the color is blue, and @var{h} is a 2-by-10 array of handles in ## which the first row holds the line handles and the ## the second row holds the marker handles); @@ -57,7 +57,7 @@ ## h = stem (x, y, "-.k"); ## @end example ## @noindent -## plots 10 stems with hights from 2 to 20 +## plots 10 stems with heights from 2 to 20 ## (the color is black, line style is @code{"-."}, and @var{h} is a 2-by-10 ## array of handles in which the first row holds the line handles and ## the second rows holds the marker handles); @@ -68,7 +68,7 @@ ## h = stem (x, y, "-.k."); ## @end example ## @noindent -## plots 10 stems with hights from 2 to 20 +## plots 10 stems with heights from 2 to 20 ## (the color is black, line style is @code{"-."} and the marker style ## is @code{"."}, and @var{h} is a 2-by-10 array of handles in which the ## first row holds the line handles and the second row holds the marker @@ -102,13 +102,20 @@ [x, y, dofill, lc, ls, mc, ms] = check_stem_arg (varargin{:}); + if (dofill) + fc = mc; + else + fc = "none"; + endif + newplot (); - z = zeros (1, numel (x))); + z = zeros (1, numel (x)); xt = x(:)'; yt = y(:)'; tmp = plot ([xt; xt], [z; yt], "color", lc, "linestyle", ls, - x, y, "color", mc, "marker", ms, "linestyle", ""); + x, y, "color", mc, "marker", ms, "linestyle", "", + "markerfacecolor", fc); if (nargout > 0) h = tmp;
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2007-04-09 John W. Eaton <jwe@octave.org> + + * graphics.cc (line::line_properties::markeredgecolor, + line::line_properties::markerfacecolor): New properties. + 2007-04-06 John W. Eaton <jwe@octave.org> * data.cc (F__vnorm__): New function.
--- a/src/graphics.cc +++ b/src/graphics.cc @@ -2404,6 +2404,8 @@ linestyle ("-"), linewidth (0.5), marker ("none"), + markeredgecolor ("auto"), + markerfacecolor ("none"), markersize (1), keylabel ("") { } @@ -2444,6 +2446,10 @@ linewidth = val; else if (name.compare ("marker")) marker = val; + else if (name.compare ("markeredgecolor")) + markeredgecolor = val; + else if (name.compare ("markerfacecolor")) + markerfacecolor = val; else if (name.compare ("markersize")) markersize = val; else if (name.compare ("keylabel")) @@ -2477,6 +2483,8 @@ m.assign ("linestyle", linestyle); m.assign ("linewidth", linewidth); m.assign ("marker", marker); + m.assign ("markeredgecolor", markeredgecolor); + m.assign ("markerface", markerfacecolor); m.assign ("markersize", markersize); m.assign ("keylabel", keylabel); @@ -2517,6 +2525,10 @@ retval = linewidth; else if (name.compare ("marker")) retval = marker; + else if (name.compare ("markeredgecolor")) + retval = markeredgecolor; + else if (name.compare ("markerfacecolor")) + retval = markerfacecolor; else if (name.compare ("markersize")) retval = markersize; else if (name.compare ("keylabel")) @@ -2544,6 +2556,8 @@ m["linestyle"] = "-"; m["linewidth"] = 0.5; m["marker"] = "none"; + m["markeredgecolor"] = "auto"; + m["markerfacecolor"] = "none"; m["markersize"] = 1; m["keylabel"] = ""; @@ -2562,6 +2576,8 @@ octave_value linestyle; octave_value linewidth; octave_value marker; + octave_value markeredgecolor; + octave_value markerfacecolor; octave_value markersize; octave_value keylabel;