Merge pull request #777 from Godisemo/patch-1

Add colorbar_title attr to plotly(js) backends
This commit is contained in:
Michael Krabbe Borregaard 2017-04-24 11:54:22 +02:00 committed by GitHub
commit 1ee6affcb3

View File

@ -19,7 +19,7 @@ const _plotly_attr = merge_with_base_supported([
:window_title, :window_title,
:guide, :lims, :ticks, :scale, :flip, :rotation, :guide, :lims, :ticks, :scale, :flip, :rotation,
:tickfont, :guidefont, :legendfont, :tickfont, :guidefont, :legendfont,
:grid, :legend, :colorbar, :grid, :legend, :colorbar, :colorbar_title,
:marker_z, :fill_z, :levels, :marker_z, :fill_z, :levels,
:ribbon, :quiver, :ribbon, :quiver,
:orientation, :orientation,
@ -446,6 +446,8 @@ function plotly_series(plt::Plot, series::Series)
end end
end end
d_out[:colorbar] = KW(:title => sp[:colorbar_title])
clims = sp[:clims] clims = sp[:clims]
if is_2tuple(clims) if is_2tuple(clims)
d_out[:zmin], d_out[:zmax] = clims d_out[:zmin], d_out[:zmax] = clims