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
|
d_outs[i] = d_out
|
||||||
end
|
end
|
||||||
if series[:fill_z] != nothing
|
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))
|
push!(d_outs, plotly_colorbar_hack(series, base_d, :line))
|
||||||
end
|
end
|
||||||
d_outs
|
d_outs
|
||||||
|
|||||||
@ -407,7 +407,7 @@ end
|
|||||||
end
|
end
|
||||||
ensure_gradient!(plotattributes, :fillcolor, :fillalpha)
|
ensure_gradient!(plotattributes, :fillcolor, :fillalpha)
|
||||||
fill_z := fz
|
fill_z := fz
|
||||||
line_z --> fz
|
line_z := fz
|
||||||
x := x_pts
|
x := x_pts
|
||||||
y := y_pts
|
y := y_pts
|
||||||
z := nothing
|
z := nothing
|
||||||
|
|||||||
@ -643,17 +643,12 @@ end
|
|||||||
function get_fillcolor(series, i::Int = 1)
|
function get_fillcolor(series, i::Int = 1)
|
||||||
fc = series[:fillcolor]
|
fc = series[:fillcolor]
|
||||||
fz = series[:fill_z]
|
fz = series[:fill_z]
|
||||||
lz = series[:line_z]
|
if fz == nothing
|
||||||
if fz == nothing && lz == nothing
|
|
||||||
isa(fc, ColorGradient) ? fc : _cycle(fc, i)
|
isa(fc, ColorGradient) ? fc : _cycle(fc, i)
|
||||||
else
|
else
|
||||||
cmin, cmax = get_clims(series[:subplot])
|
cmin, cmax = get_clims(series[:subplot])
|
||||||
grad = isa(fc, ColorGradient) ? fc : cgrad()
|
grad = isa(fc, ColorGradient) ? fc : cgrad()
|
||||||
if fz != nothing
|
|
||||||
grad[clamp((_cycle(fz, i) - cmin) / (cmax - cmin), 0, 1)]
|
grad[clamp((_cycle(fz, i) - cmin) / (cmax - cmin), 0, 1)]
|
||||||
elseif lz != nothing
|
|
||||||
grad[clamp((_cycle(lz, i) - cmin) / (cmax - cmin), 0, 1)]
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user