Mercurial > hg > octave-lyh
changeset 6511:73ce4e14d35d
[project @ 2007-04-10 01:50:48 by jwe]
author | jwe |
---|---|
date | Tue, 10 Apr 2007 01:50:48 +0000 |
parents | cbae86745c5b |
children | 747ba2dc157e |
files | scripts/ChangeLog scripts/plot/stem.m |
diffstat | 2 files changed, 14 insertions(+), 4 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: Add back the baseline line and let it be not adjustable + in response to a change in x limits for now. + 2007-04-09 John W. Eaton <jwe@octave.org> * plot/__go_draw_axes__.m (__gnuplot_write_data__): New function.
--- a/scripts/plot/stem.m +++ b/scripts/plot/stem.m @@ -113,12 +113,17 @@ 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", "", - "markerfacecolor", fc); + h_stems = plot ([xt; xt], [z; yt], "color", lc, "linestyle", ls, + x, y, "color", mc, "marker", ms, "linestyle", "", + "markerfacecolor", fc); + + ## Must draw the plot first to get proper x limits. + drawnow(); + x_axis_range = get (gca, "xlim"); + h_baseline = line (x_axis_range, [0, 0], "color", [0, 0, 0]); if (nargout > 0) - h = tmp; + h = [h_stems; h_baseline]; endif endfunction