fixes for plotly
This commit is contained in:
parent
8e3bd07c91
commit
7a702489d0
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user