# HG changeset patch # User jwe # Date 1176169848 0 # Node ID 73ce4e14d35d14e47470cbc68f4f98485d4b161f # Parent cbae86745c5b20fdeac1a755aa6c649587e5127c [project @ 2007-04-10 01:50:48 by jwe] diff --git a/scripts/ChangeLog b/scripts/ChangeLog --- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,8 @@ +2007-04-09 Daniel J. Sebald + + * 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 * plot/__go_draw_axes__.m (__gnuplot_write_data__): New function. diff --git a/scripts/plot/stem.m b/scripts/plot/stem.m --- 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