From 3cb81d6d04f564155d28af432b92311978afcbb5 Mon Sep 17 00:00:00 2001 From: Simon Christ Date: Wed, 12 May 2021 18:35:19 +0200 Subject: [PATCH] fix alpha for surface (#3489) --- src/backends/pgfplotsx.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/backends/pgfplotsx.jl b/src/backends/pgfplotsx.jl index 50b5e474..d3ad78f1 100644 --- a/src/backends/pgfplotsx.jl +++ b/src/backends/pgfplotsx.jl @@ -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