fix iteration of segments

This commit is contained in:
Simon Christ 2020-05-06 12:57:01 +02:00
parent 6ddf31d465
commit 95e1fad160

View File

@ -74,9 +74,13 @@ function iter_segments(series::Series)
elseif has_attribute_segments(series) elseif has_attribute_segments(series)
if series[:seriestype] in (:scatter, :scatter3d) if series[:seriestype] in (:scatter, :scatter3d)
return [[i] for i in eachindex(y)] return [[i] for i in eachindex(y)]
else
if any(isnan,y)
return [iter_segments(y)...]
else else
return [i:(i + 1) for i in firstindex(y):lastindex(y)-1] return [i:(i + 1) for i in firstindex(y):lastindex(y)-1]
end end
end
else else
segs = UnitRange{Int}[] segs = UnitRange{Int}[]
args = RecipesPipeline.is3d(series) ? (x, y, z) : (x, y) args = RecipesPipeline.is3d(series) ? (x, y, z) : (x, y)