From ee73e32b0e2ab9e34b76c81d3c433966eab79952 Mon Sep 17 00:00:00 2001 From: Andrew Palugniok Date: Tue, 26 Jun 2018 18:26:13 +0100 Subject: [PATCH] Fix hover and zcolor interaction in Plotly. --- src/backends/plotly.jl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/backends/plotly.jl b/src/backends/plotly.jl index 1daa9d26..a388dd5f 100644 --- a/src/backends/plotly.jl +++ b/src/backends/plotly.jl @@ -789,7 +789,7 @@ function plotly_series_segments(series::Series, d_base::KW, x, y, z) end plotly_polar!(d_out, series) - plotly_hover!(d_out, series[:hover]) + plotly_hover!(d_out, _cycle(series[:hover], rng)) if hasfillrange # if hasfillrange is true, return two dictionaries (one for original @@ -840,6 +840,7 @@ function plotly_colorbar_hack(series::Series, d_base::KW, sym::Symbol) cmin, cmax = get_clims(series[:subplot]) d_out[:showlegend] = false d_out[:type] = is3d(series) ? :scatter3d : :scatter + d_out[:hoverinfo] = :none d_out[:mode] = :markers d_out[:x], d_out[:y] = [series[:x][1]], [series[:y][1]] if is3d(series) @@ -848,6 +849,7 @@ function plotly_colorbar_hack(series::Series, d_base::KW, sym::Symbol) # zrange = zmax == zmin ? 1 : zmax - zmin # if all marker_z values are the same, plot all markers same color (avoids division by zero in next line) d_out[:marker] = KW( :size => 0, + :opacity => 0, :color => [0.5], :cmin => cmin, :cmax => cmax,