From cad0f15aed61a41d23c2296690fb475b5df5dfd6 Mon Sep 17 00:00:00 2001 From: Michael Krabbe Borregaard Date: Wed, 29 Aug 2018 18:38:53 +0200 Subject: [PATCH] fix plotly errors --- src/backends/plotly.jl | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/backends/plotly.jl b/src/backends/plotly.jl index 6036767a..3e525b5b 100644 --- a/src/backends/plotly.jl +++ b/src/backends/plotly.jl @@ -573,7 +573,7 @@ function plotly_series(plt::Plot, series::Series) # set the "type" if st in (:path, :scatter, :scattergl, :straightline, :path3d, :scatter3d) - return plotly_series_segments(series, plotattributes, x, y, z, clims) + return plotly_series_segments(series, plotattributes_out, x, y, z, clims) elseif st == :heatmap x = heatmap_edges(x, sp[:xaxis][:scale]) @@ -678,7 +678,7 @@ function plotly_series_shapes(plt::Plot, series::Series, clims) :fillcolor => rgba_string(plot_color(get_fillcolor(series, clims, i), get_fillalpha(series, i))), )) if series[:markerstrokewidth] > 0 - plotattributes[:line] = KW( + plotattributes_out[:line] = KW( :color => rgba_string(plot_color(get_linecolor(series, clims, i), get_linealpha(series, i))), :width => get_linewidth(series, i), :dash => string(get_linestyle(series, i)), @@ -699,7 +699,7 @@ function plotly_series_shapes(plt::Plot, series::Series, clims) plotattributes_outs end -function plotly_series_segments(series::Series, ploattributes_base::KW, x, y, z, clims) +function plotly_series_segments(series::Series, plotattributes_base::KW, x, y, z, clims) st = series[:seriestype] sp = series[:subplot] isscatter = st in (:scatter, :scatter3d, :scattergl) @@ -727,11 +727,11 @@ function plotly_series_segments(series::Series, ploattributes_base::KW, x, y, z, hasline ? "lines" : "none" end if series[:fillrange] == true || series[:fillrange] == 0 || isa(series[:fillrange], Tuple) - plotattributes[:fill] = "tozeroy" - plotattributes[:fillcolor] = rgba_string(plot_color(get_fillcolor(series, clims, i), get_fillalpha(series, i))) + plotattributes_out[:fill] = "tozeroy" + plotattributes_out[:fillcolor] = rgba_string(plot_color(get_fillcolor(series, clims, i), get_fillalpha(series, i))) elseif typeof(series[:fillrange]) <: Union{AbstractVector{<:Real}, Real} - plotattributes[:fill] = "tonexty" - plotattributes[:fillcolor] = rgba_string(plot_color(get_fillcolor(series, clims, i), get_fillalpha(series, i))) + plotattributes_out[:fill] = "tonexty" + plotattributes_out[:fillcolor] = rgba_string(plot_color(get_fillcolor(series, clims, i), get_fillalpha(series, i))) elseif !(series[:fillrange] in (false, nothing)) @warn("fillrange ignored... plotly only supports filling to zero and to a vector of values. fillrange: $(series[:fillrange])") end @@ -763,7 +763,7 @@ function plotly_series_segments(series::Series, ploattributes_base::KW, x, y, z, # add "line" if hasline - plotattributes[:line] = KW( + plotattributes_out[:line] = KW( :color => rgba_string(plot_color(get_linecolor(series, clims, i), get_linealpha(series, i))), :width => get_linewidth(series, i), :shape => if st == :steppre