From 5395b418525b753028e2c8e52d9aed18090b7e96 Mon Sep 17 00:00:00 2001 From: Leon Wabeke Date: Wed, 22 Feb 2017 15:57:41 +0200 Subject: [PATCH] Attempt to add support for clims to plotly backend Added support for clims, seems to work on heatmap, surface and contour. On surface zlims be still be set to be different from clims. --- src/backends/plotly.jl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/backends/plotly.jl b/src/backends/plotly.jl index bbdd29b9..85c69105 100644 --- a/src/backends/plotly.jl +++ b/src/backends/plotly.jl @@ -31,6 +31,7 @@ const _plotly_attr = merge_with_base_supported([ :hover, :inset_subplots, :bar_width, + :clims, ]) const _plotly_seriestype = [ @@ -438,6 +439,11 @@ function plotly_series(plt::Plot, series::Series) end end + clims = sp[:clims] + if is_2tuple(clims) + d_out[:zmin], d_out[:zmax] = clims + end + # set the "type" if st in (:path, :scatter, :scattergl) d_out[:type] = st==:scattergl ? "scattergl" : "scatter"