From 0b8f7d67dc8de889eecc3635de07ab673c56c9dc Mon Sep 17 00:00:00 2001 From: Niklas Korsbo Date: Wed, 20 Nov 2019 10:17:28 +0000 Subject: [PATCH] Allow legend font alpha with pgfplots. --- src/backends/pgfplots.jl | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/backends/pgfplots.jl b/src/backends/pgfplots.jl index bce8e521..69c85c64 100644 --- a/src/backends/pgfplots.jl +++ b/src/backends/pgfplots.jl @@ -479,7 +479,15 @@ function _update_plot_object(plt::Plot{PGFPlotsBackend}) cstr, bg_alpha = pgf_color(plot_color(sp[:background_color_legend])) fg_alpha = alpha(plot_color(sp[:foreground_color_legend])) - push!(style, string("legend style = {", pgf_linestyle(pgf_thickness_scaling(sp), sp[:foreground_color_legend], fg_alpha, "solid", ), ",", "fill = $cstr,", "fill opacity = $bg_alpha,", "text opacity = 1,", "font = ", pgf_font(sp[:legendfontsize], pgf_thickness_scaling(sp)), "}")) + push!(style, string( + "legend style = {", + pgf_linestyle(pgf_thickness_scaling(sp), sp[:foreground_color_legend], fg_alpha, "solid", ), ",", + "fill = $cstr,", + "fill opacity = $bg_alpha,", + "text opacity = $(alpha(plot_color(sp[:legendfontcolor]))),", + "font = ", pgf_font(sp[:legendfontsize], pgf_thickness_scaling(sp)), + "}", + )) if any(s[:seriestype] == :contour for s in series_list(sp)) kw[:view] = "{0}{90}"