fix alpha for surface (#3489)

This commit is contained in:
Simon Christ 2021-05-12 18:35:19 +02:00 committed by GitHub
parent 61f2d825b6
commit 3cb81d6d04
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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