construct font

This commit is contained in:
Simon Christ 2021-11-10 12:46:51 +01:00
parent 0e09478a6a
commit f430953b2b
2 changed files with 5 additions and 3 deletions

View File

@ -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(

View File

@ -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?