comparison scripts/plot/stairs.m @ 17528:1da32463b540

stairs.m: Add missing definition of nr, nc. * scripts/plot/stairs.m: Add missing definition of nr, nc. Use just one call to get() in listener function for performance.
author Rik <rik@octave.org>
date Tue, 01 Oct 2013 14:22:42 -0700
parents 76614e624818
children
comparison
equal deleted inserted replaced
17527:76614e624818 17528:1da32463b540
127 endif 127 endif
128 128
129 if (! size_equal (x, y)) 129 if (! size_equal (x, y))
130 error ("stairs: X and Y sizes must match"); 130 error ("stairs: X and Y sizes must match");
131 endif 131 endif
132
133 [nr, nc] = size (y);
132 134
133 len = 2*nr - 1; 135 len = 2*nr - 1;
134 136
135 xs = ys = zeros (len, nc); 137 xs = ys = zeros (len, nc);
136 138
234 236
235 endfunction 237 endfunction
236 238
237 function update_props (h, ~) 239 function update_props (h, ~)
238 set (get (h, "children"), 240 set (get (h, "children"),
239 "color", get (h, "color"), 241 {"color", "linestyle", "linewidth", "marker", "markeredgecolor",
240 "linestyle", get (h, "linestyle"), 242 "markerfacecolor", "markersize", "markersize"},
241 "linewidth", get (h, "linewidth"), 243 get (h, {"color", "linestyle", "linewidth", "marker", "markeredgecolor",
242 "marker", get (h, "marker"), 244 "markerfacecolor", "markersize", "markersize"}));
243 "markeredgecolor", get (h, "markeredgecolor"),
244 "markerfacecolor", get (h, "markerfacecolor"),
245 "markersize", get (h, "markersize"));
246 endfunction 245 endfunction
247 246
248 function update_data (h, ~) 247 function update_data (h, ~)
249 x = get (h, "xdata"); 248 x = get (h, "xdata");
250 y = get (h, "ydata"); 249 y = get (h, "ydata");