# HG changeset patch # User Rik # Date 1380662562 25200 # Node ID 1da32463b540c1b61019b29a73577d33e354895b # Parent 76614e624818cc513eb6b65f530723f2a0535bc3 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. diff --git a/scripts/plot/stairs.m b/scripts/plot/stairs.m --- 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, ~)