From 33327d39926c1716c4c55d20498ec326cdd9ce5c Mon Sep 17 00:00:00 2001 From: Daniel Schwabeneder Date: Sun, 18 Jun 2017 17:45:20 +0200 Subject: [PATCH 1/2] allow turning off the colorbar for heatmap, contour and surface --- src/backends/plotly.jl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/backends/plotly.jl b/src/backends/plotly.jl index 4f3c956c..b7520e23 100644 --- a/src/backends/plotly.jl +++ b/src/backends/plotly.jl @@ -479,6 +479,7 @@ function plotly_series(plt::Plot, series::Series) d_out[:type] = "heatmap" # d_out[:x], d_out[:y], d_out[:z] = series[:x], series[:y], transpose_z(series, series[:z].surf, false) d_out[:colorscale] = plotly_colorscale(series[:fillcolor], series[:fillalpha]) + d_out[:showscale] = sp[:legend] != :none elseif st == :contour d_out[:type] = "contour" @@ -487,6 +488,7 @@ function plotly_series(plt::Plot, series::Series) d_out[:ncontours] = series[:levels] d_out[:contours] = KW(:coloring => series[:fillrange] != nothing ? "fill" : "lines") d_out[:colorscale] = plotly_colorscale(series[:linecolor], series[:linealpha]) + d_out[:showscale] = sp[:legend] != :none elseif st in (:surface, :wireframe) d_out[:type] = "surface" @@ -504,6 +506,7 @@ function plotly_series(plt::Plot, series::Series) if series[:fill_z] != nothing d_out[:surfacecolor] = plotly_surface_data(series, series[:fill_z]) end + d_out[:showscale] = sp[:legend] != :none end elseif st == :pie From b091d95eb2af94fc689a13e6a1f4d31ba46d99b2 Mon Sep 17 00:00:00 2001 From: Daniel Schwabeneder Date: Sun, 18 Jun 2017 17:56:47 +0200 Subject: [PATCH 2/2] turn off colorbar for wireframe --- src/backends/plotly.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/src/backends/plotly.jl b/src/backends/plotly.jl index b7520e23..c9cd8e22 100644 --- a/src/backends/plotly.jl +++ b/src/backends/plotly.jl @@ -501,6 +501,7 @@ function plotly_series(plt::Plot, series::Series) :highlightwidth => series[:linewidth], ) d_out[:contours] = KW(:x => wirelines, :y => wirelines, :z => wirelines) + d_out[:showscale] = false else d_out[:colorscale] = plotly_colorscale(series[:fillcolor], series[:fillalpha]) if series[:fill_z] != nothing