Merge pull request #3340 from daschw/series-segments

fix series-segments for empty series
This commit is contained in:
Daniel Schwabeneder 2021-03-12 21:49:26 +01:00 committed by GitHub
commit 271d93c1ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -77,7 +77,7 @@ end
function series_segments(series::Series, seriestype::Symbol = :path) function series_segments(series::Series, seriestype::Symbol = :path)
x, y, z = series[:x], series[:y], series[:z] x, y, z = series[:x], series[:y], series[:z]
x === nothing && return UnitRange{Int}[] (x === nothing || isempty(x)) && return UnitRange{Int}[]
args = RecipesPipeline.is3d(series) ? (x, y, z) : (x, y) args = RecipesPipeline.is3d(series) ? (x, y, z) : (x, y)
nan_segments = collect(iter_segments(args...)) nan_segments = collect(iter_segments(args...))