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