Mercurial > hg > octave-nkf
changeset 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 | ec5bd610a11f |
files | scripts/plot/stairs.m |
diffstat | 1 files changed, 6 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/plot/stairs.m +++ b/scripts/plot/stairs.m @@ -130,6 +130,8 @@ error ("stairs: X and Y sizes must match"); endif + [nr, nc] = size (y); + len = 2*nr - 1; xs = ys = zeros (len, nc); @@ -236,13 +238,10 @@ function update_props (h, ~) set (get (h, "children"), - "color", get (h, "color"), - "linestyle", get (h, "linestyle"), - "linewidth", get (h, "linewidth"), - "marker", get (h, "marker"), - "markeredgecolor", get (h, "markeredgecolor"), - "markerfacecolor", get (h, "markerfacecolor"), - "markersize", get (h, "markersize")); + {"color", "linestyle", "linewidth", "marker", "markeredgecolor", + "markerfacecolor", "markersize", "markersize"}, + get (h, {"color", "linestyle", "linewidth", "marker", "markeredgecolor", + "markerfacecolor", "markersize", "markersize"})); endfunction function update_data (h, ~)