fix fontrotation being interpreted as fontsize (#3533)

* fix convenience font functions

* correct size argument
This commit is contained in:
Simon Christ 2021-06-02 22:12:30 +02:00 committed by GitHub
parent 697e5a87cf
commit 5fafddb995
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -939,67 +939,67 @@ ignorenan_extrema(plt::Plot) = (xmin(plt), xmax(plt))
# ---------------------------------------------------------------
# get fonts from objects:
plottitlefont(p::Plot) = font(
p[:plot_titlefontfamily],
p[:plot_titlefontsize],
p[:plot_titlefontvalign],
p[:plot_titlefonthalign],
p[:plot_titlefontrotation],
p[:plot_titlefontcolor],
plottitlefont(p::Plot) = font(;
family = p[:plot_titlefontfamily],
pointsize = p[:plot_titlefontsize],
valign = p[:plot_titlefontvalign],
halign = p[:plot_titlefonthalign],
rotation = p[:plot_titlefontrotation],
color = p[:plot_titlefontcolor],
)
colorbartitlefont(sp::Subplot) = font(
sp[:colorbar_titlefontfamily],
sp[:colorbar_titlefontsize],
sp[:colorbar_titlefontvalign],
sp[:colorbar_titlefonthalign],
sp[:colorbar_titlefontrotation],
sp[:colorbar_titlefontcolor],
colorbartitlefont(sp::Subplot) = font(;
family = sp[:colorbar_titlefontfamily],
pointsize = sp[:colorbar_titlefontsize],
valign = sp[:colorbar_titlefontvalign],
halign = sp[:colorbar_titlefonthalign],
rotation = sp[:colorbar_titlefontrotation],
color = sp[:colorbar_titlefontcolor],
)
titlefont(sp::Subplot) = font(
sp[:titlefontfamily],
sp[:titlefontsize],
sp[:titlefontvalign],
sp[:titlefonthalign],
sp[:titlefontrotation],
sp[:titlefontcolor],
titlefont(sp::Subplot) = font(;
family = sp[:titlefontfamily],
pointsize = sp[:titlefontsize],
valign = sp[:titlefontvalign],
halign = sp[:titlefonthalign],
rotation = sp[:titlefontrotation],
color = sp[:titlefontcolor],
)
legendfont(sp::Subplot) = font(
sp[:legendfontfamily],
sp[:legendfontsize],
sp[:legendfontvalign],
sp[:legendfonthalign],
sp[:legendfontrotation],
sp[:legendfontcolor],
legendfont(sp::Subplot) = font(;
family = sp[:legendfontfamily],
pointsize = sp[:legendfontsize],
valign = sp[:legendfontvalign],
halign = sp[:legendfonthalign],
rotation = sp[:legendfontrotation],
color = sp[:legendfontcolor],
)
legendtitlefont(sp::Subplot) = font(
sp[:legendtitlefontfamily],
sp[:legendtitlefontsize],
sp[:legendtitlefontvalign],
sp[:legendtitlefonthalign],
sp[:legendtitlefontrotation],
sp[:legendtitlefontcolor],
legendtitlefont(sp::Subplot) = font(;
family = sp[:legendtitlefontfamily],
pointsize = sp[:legendtitlefontsize],
valign = sp[:legendtitlefontvalign],
halign = sp[:legendtitlefonthalign],
rotation = sp[:legendtitlefontrotation],
color = sp[:legendtitlefontcolor],
)
tickfont(ax::Axis) = font(
ax[:tickfontfamily],
ax[:tickfontsize],
ax[:tickfontvalign],
ax[:tickfonthalign],
ax[:tickfontrotation],
ax[:tickfontcolor],
tickfont(ax::Axis) = font(;
family = ax[:tickfontfamily],
pointsize = ax[:tickfontsize],
valign = ax[:tickfontvalign],
halign = ax[:tickfonthalign],
rotation = ax[:tickfontrotation],
color = ax[:tickfontcolor],
)
guidefont(ax::Axis) = font(
ax[:guidefontfamily],
ax[:guidefontsize],
ax[:guidefontvalign],
ax[:guidefonthalign],
ax[:guidefontrotation],
ax[:guidefontcolor],
guidefont(ax::Axis) = font(;
family = ax[:guidefontfamily],
pointsize = ax[:guidefontsize],
valign = ax[:guidefontvalign],
halign = ax[:guidefonthalign],
rotation = ax[:guidefontrotation],
color = ax[:guidefontcolor],
)
# ---------------------------------------------------------------