comparison scripts/plot/stem.m @ 6511:73ce4e14d35d

[project @ 2007-04-10 01:50:48 by jwe]
author jwe
date Tue, 10 Apr 2007 01:50:48 +0000
parents 84f2d0253aea
children 7f56be6b0902
comparison
equal deleted inserted replaced
6510:cbae86745c5b 6511:73ce4e14d35d
111 newplot (); 111 newplot ();
112 112
113 z = zeros (1, numel (x)); 113 z = zeros (1, numel (x));
114 xt = x(:)'; 114 xt = x(:)';
115 yt = y(:)'; 115 yt = y(:)';
116 tmp = plot ([xt; xt], [z; yt], "color", lc, "linestyle", ls, 116 h_stems = plot ([xt; xt], [z; yt], "color", lc, "linestyle", ls,
117 x, y, "color", mc, "marker", ms, "linestyle", "", 117 x, y, "color", mc, "marker", ms, "linestyle", "",
118 "markerfacecolor", fc); 118 "markerfacecolor", fc);
119
120 ## Must draw the plot first to get proper x limits.
121 drawnow();
122 x_axis_range = get (gca, "xlim");
123 h_baseline = line (x_axis_range, [0, 0], "color", [0, 0, 0]);
119 124
120 if (nargout > 0) 125 if (nargout > 0)
121 h = tmp; 126 h = [h_stems; h_baseline];
122 endif 127 endif
123 128
124 endfunction 129 endfunction
125 130
126 function [x, y, dofill, lc, ls, mc, ms] = check_stem_arg (varargin) 131 function [x, y, dofill, lc, ls, mc, ms] = check_stem_arg (varargin)