pyplot font family
This commit is contained in:
parent
17afa11723
commit
ea18b11475
@ -976,6 +976,7 @@ function _before_layout_calcs(plt::Plot{PyPlotBackend})
|
|||||||
end
|
end
|
||||||
ax[func][:set_text](sp[:title])
|
ax[func][:set_text](sp[:title])
|
||||||
ax[func][:set_fontsize](py_dpi_scale(plt, sp[:titlefont].pointsize))
|
ax[func][:set_fontsize](py_dpi_scale(plt, sp[:titlefont].pointsize))
|
||||||
|
ax[func][:set_family](sp[:titlefont].family)
|
||||||
ax[func][:set_color](py_color(sp[:foreground_color_title]))
|
ax[func][:set_color](py_color(sp[:foreground_color_title]))
|
||||||
# ax[:set_title](sp[:title], loc = loc)
|
# ax[:set_title](sp[:title], loc = loc)
|
||||||
end
|
end
|
||||||
@ -1000,8 +1001,10 @@ function _before_layout_calcs(plt::Plot{PyPlotBackend})
|
|||||||
ax[Symbol("invert_", letter, "axis")]()
|
ax[Symbol("invert_", letter, "axis")]()
|
||||||
end
|
end
|
||||||
pyaxis[:label][:set_fontsize](py_dpi_scale(plt, axis[:guidefont].pointsize))
|
pyaxis[:label][:set_fontsize](py_dpi_scale(plt, axis[:guidefont].pointsize))
|
||||||
|
pyaxis[:label][:set_family](axis[:guidefont].family)
|
||||||
for lab in ax[Symbol("get_", letter, "ticklabels")]()
|
for lab in ax[Symbol("get_", letter, "ticklabels")]()
|
||||||
lab[:set_fontsize](py_dpi_scale(plt, axis[:tickfont].pointsize))
|
lab[:set_fontsize](py_dpi_scale(plt, axis[:tickfont].pointsize))
|
||||||
|
lab[:set_family](axis[:tickfont].family)
|
||||||
lab[:set_rotation](axis[:rotation])
|
lab[:set_rotation](axis[:rotation])
|
||||||
end
|
end
|
||||||
if sp[:grid]
|
if sp[:grid]
|
||||||
@ -1131,13 +1134,14 @@ function py_add_legend(plt::Plot, sp::Subplot, ax)
|
|||||||
loc = get(_pyplot_legend_pos, leg, "best"),
|
loc = get(_pyplot_legend_pos, leg, "best"),
|
||||||
scatterpoints = 1,
|
scatterpoints = 1,
|
||||||
fontsize = py_dpi_scale(plt, sp[:legendfont].pointsize)
|
fontsize = py_dpi_scale(plt, sp[:legendfont].pointsize)
|
||||||
|
# family = sp[:legendfont].family
|
||||||
# framealpha = 0.6
|
# framealpha = 0.6
|
||||||
)
|
)
|
||||||
leg[:set_zorder](1000)
|
leg[:set_zorder](1000)
|
||||||
|
|
||||||
fgcolor = py_color(sp[:foreground_color_legend])
|
fgcolor = py_color(sp[:foreground_color_legend])
|
||||||
for txt in leg[:get_texts]()
|
for txt in leg[:get_texts]()
|
||||||
PyPlot.plt[:setp](txt, color = fgcolor)
|
PyPlot.plt[:setp](txt, color = fgcolor, family = sp[:legendfont].family)
|
||||||
end
|
end
|
||||||
|
|
||||||
# set some legend properties
|
# set some legend properties
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user