update gaston backend

This commit is contained in:
Simon Christ 2021-11-01 13:52:03 +01:00
parent 41cf64b400
commit 1fe9a9f536

View File

@ -505,8 +505,8 @@ function gaston_set_ticks!(axesconf, ticks, letter, maj_min, add)
end end
function gaston_set_legend!(axesconf, sp, any_label) function gaston_set_legend!(axesconf, sp, any_label)
leg = sp[:legend] leg = sp[:legend_position]
if sp[:legend] (:none, :inline) && any_label if sp[:legend_position] (:none, :inline) && any_label
leg == :best && (leg = :topright) leg == :best && (leg = :topright)
push!( push!(
@ -517,9 +517,9 @@ function gaston_set_legend!(axesconf, sp, any_label)
occursin(position, string(leg)) && push!(axesconf, "set key $position") occursin(position, string(leg)) && push!(axesconf, "set key $position")
end end
push!(axesconf, "set key $(gaston_font(legendfont(sp), rot=false, align=false))") push!(axesconf, "set key $(gaston_font(legendfont(sp), rot=false, align=false))")
if sp[:legendtitle] !== nothing if sp[:legend_title] !== nothing
# NOTE: cannot use legendtitlefont(sp) as it will override legendfont # NOTE: cannot use legendtitlefont(sp) as it will override legendfont
push!(axesconf, "set key title '$(sp[:legendtitle])'") push!(axesconf, "set key title '$(sp[:legend_title])'")
end end
push!(axesconf, "set key box lw 1 opaque") push!(axesconf, "set key box lw 1 opaque")
push!(axesconf, "set border back") push!(axesconf, "set border back")