diff --git a/src/args.jl b/src/args.jl index a851326a..b6576495 100644 --- a/src/args.jl +++ b/src/args.jl @@ -1948,8 +1948,10 @@ function _update_subplot_colors(sp::Subplot) end function _update_subplot_legend(sp::Subplot, plotattributes_in) - @show plotattributes_in |> keys - # sp.attr[:legend] = Legend(background_color = sp[:legend_background_color], foreground_color = sp[:legend_foreground_color], position = sp[:legend_position], title = sp[:legend_title], font = font(sp[:legend_font]; )) # TODO: make legend_font and legend_font_* attributes coherent + f_attr = NamedTuple( k => plotattributes_in[Symbol(:legend_font_, k)] for k in (:family, :pointsize, :valign, :halign, :rotation, :color) if haskey(plotattributes_in, Symbol(:legend_font_, k))) + sp.attr[:legend_font] = font(default(plotattributes_in, :legend_font); + f_attr... + ) end function _update_axis( diff --git a/src/pipeline.jl b/src/pipeline.jl index 6bf84925..37938b33 100644 --- a/src/pipeline.jl +++ b/src/pipeline.jl @@ -262,8 +262,8 @@ function _subplot_setup(plt::Plot, plotattributes::AKW, kw_list::Vector{KW}) else get(sp_attrs, sp, KW()) end - _update_subplot_args(plt, sp, attr, idx, false) _update_subplot_legend(sp, attr) + _update_subplot_args(plt, sp, attr, idx, false) end # do we need to link any axes together?