From 0a6edd5d60c79026ee91104a0aa1a8a302a415e6 Mon Sep 17 00:00:00 2001 From: Daniel Schwabeneder Date: Fri, 19 Feb 2021 22:08:02 +0100 Subject: [PATCH] fix gr test example --- src/backends/gr.jl | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/backends/gr.jl b/src/backends/gr.jl index b6fc8135..56693c00 100644 --- a/src/backends/gr.jl +++ b/src/backends/gr.jl @@ -1732,12 +1732,19 @@ function gr_draw_contour(series, x, y, z, clims) end function gr_draw_surface(series, x, y, z, clims) - gr_set_transparency(get_fillcolor(series), get_fillalpha(series)) + if series[:seriestype] === :surface + fillalpha = get_fillalpha(series) + fillcolor = get_fillcolor(series) if length(x) == length(y) == length(z) x, y, z = GR.gridit(x, y, z, 200, 200) end - GR.surface(x, y, z, GR.OPTION_COLORED_MESH) + if (!isnothing(fillalpha) && fillalpha < 1) || alpha(first(fillcolor)) < 1 + gr_set_transparency(fillcolor, fillalpha) + GR.surface(x, y, z, GR.OPTION_COLORED_MESH) + else + GR.gr3.surface(x, y, z, GR.OPTION_COLORED_MESH) + end else # wireframe GR.setfillcolorind(0) GR.surface(x, y, z, GR.OPTION_FILLED_MESH)