From a5ddebf44d548537e93be904b6f59dabeebd5068 Mon Sep 17 00:00:00 2001 From: Thomas Breloff Date: Wed, 15 Jun 2016 13:02:31 -0400 Subject: [PATCH] curves fix --- src/recipes.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/recipes.jl b/src/recipes.jl index 54efd526..ff7bc1a1 100644 --- a/src/recipes.jl +++ b/src/recipes.jl @@ -360,12 +360,13 @@ end newz = z != nothing ? zeros(0) : nothing lz = d[:line_z] newlz = lz != nothing ? zeros(0) : nothing + npoints = pop!(d, :npoints, 30) # for each line segment (point series with no NaNs), convert it into a bezier curve # where the points are the control points of the curve for rng in iter_segments(args...) length(rng) < 2 && continue - ts = linspace(0, 1, pop!(d, :npoints, 20)) + ts = linspace(0, 1, npoints) nanappend!(newx, map(t -> bezier_value(cycle(x,rng), t), ts)) nanappend!(newy, map(t -> bezier_value(cycle(y,rng), t), ts)) if z != nothing