add legendtitlefont pointsize and color

This commit is contained in:
Simon Christ 2021-06-04 18:03:58 +02:00 committed by Simon Christ
parent 9f27271b05
commit eb9766775c

View File

@ -250,10 +250,18 @@ function (pgfx_plot::PGFPlotsXPlot)(plt::Plot{PGFPlotsXBackend})
push!(axis, extra_sp...)
end
if sp[:legend_title] !== nothing
legtfont = legendtitlefont(sp)
push!(axis, PGFPlotsX.Options("\\addlegendimage{empty legend}" => nothing))
push!(
axis,
PGFPlotsX.LegendEntry(
PGFPlotsX.Options(
"font" => pgfx_font(
legtfont.pointsize,
pgfx_thickness_scaling(sp),
),
"text" => legtfont.color
),
string("\\hspace{-.6cm}{\\textbf{", sp[:legend_title], "}}"),
false,
),