fixes for plotly

This commit is contained in:
Daniel Schwabeneder 2018-04-07 15:54:06 +02:00
parent 8e3bd07c91
commit 7a702489d0
3 changed files with 5 additions and 8 deletions

View File

@ -669,6 +669,8 @@ function plotly_series_shapes(plt::Plot, series::Series)
d_outs[i] = d_out
end
if series[:fill_z] != nothing
push!(d_outs, plotly_colorbar_hack(series, base_d, :fill))
elseif series[:line_z] != nothing
push!(d_outs, plotly_colorbar_hack(series, base_d, :line))
end
d_outs

View File

@ -407,7 +407,7 @@ end
end
ensure_gradient!(plotattributes, :fillcolor, :fillalpha)
fill_z := fz
line_z --> fz
line_z := fz
x := x_pts
y := y_pts
z := nothing

View File

@ -643,17 +643,12 @@ end
function get_fillcolor(series, i::Int = 1)
fc = series[:fillcolor]
fz = series[:fill_z]
lz = series[:line_z]
if fz == nothing && lz == nothing
if fz == nothing
isa(fc, ColorGradient) ? fc : _cycle(fc, i)
else
cmin, cmax = get_clims(series[:subplot])
grad = isa(fc, ColorGradient) ? fc : cgrad()
if fz != nothing
grad[clamp((_cycle(fz, i) - cmin) / (cmax - cmin), 0, 1)]
elseif lz != nothing
grad[clamp((_cycle(lz, i) - cmin) / (cmax - cmin), 0, 1)]
end
grad[clamp((_cycle(fz, i) - cmin) / (cmax - cmin), 0, 1)]
end
end