fix alpha for surface (#3489)

This commit is contained in:
Simon Christ 2021-05-12 18:35:19 +02:00 committed by Daniel Schwabeneder
parent a2f5f6b58f
commit 452aed72be

View File

@ -479,13 +479,14 @@ function pgfx_add_series!(::Val{:scatter3d}, axis, series_opt, series, series_fu
end end
function pgfx_add_series!(::Val{:surface}, axis, series_opt, series, series_func, opt) function pgfx_add_series!(::Val{:surface}, axis, series_opt, series, series_func, opt)
alpha = get_fillalpha(series)
push!( push!(
series_opt, series_opt,
"surf" => nothing, "surf" => nothing,
"mesh/rows" => length(opt[:x]), "mesh/rows" => length(opt[:x]),
"mesh/cols" => length(opt[:y]), "mesh/cols" => length(opt[:y]),
"z buffer" => "sort", "z buffer" => "sort",
"opacity" => get_fillalpha(series), "opacity" => alpha === nothing ? 1.0 : alpha,
) )
pgfx_add_series!(axis, series_opt, series, series_func, opt) pgfx_add_series!(axis, series_opt, series, series_func, opt)
end end