From 530d1c6a387ee18b76d1991f6f82722b1c3f837f Mon Sep 17 00:00:00 2001 From: Daniel Schwabeneder Date: Thu, 8 Aug 2019 12:58:29 +0200 Subject: [PATCH] don't return undef dict --- src/backends/plotly.jl | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/backends/plotly.jl b/src/backends/plotly.jl index 1896d37a..bdad392a 100644 --- a/src/backends/plotly.jl +++ b/src/backends/plotly.jl @@ -631,11 +631,9 @@ function plotly_series_segments(series::Series, plotattributes_base::KW, x, y, z (isa(series[:fillrange], AbstractVector) || isa(series[:fillrange], Tuple)) segments = iter_segments(series) - plotattributes_outs = Vector{KW}(undef, (hasfillrange ? 2 : 1 ) * length(segments)) + plotattributes_outs = fill(KW(), (hasfillrange ? 2 : 1 ) * length(segments)) for (i,rng) in enumerate(segments) - !isscatter && length(rng) < 2 && continue - plotattributes_out = deepcopy(plotattributes_base) plotattributes_out[:showlegend] = i==1 ? should_add_to_legend(series) : false plotattributes_out[:legendgroup] = series[:label]