だんだんいいかげんになってきたこのシリーズ,今回は凡例文字のサイズと回転のアトリビュートです。
別名
次の通りです。(投げやり)
legend_font_pointsize
legend_font_pointsizes
legendfontpointsize
legendfontpointsizes
legendfontsize
legend_font_rotation
legend_font_rotations
legendfontrotation
legendfontrotations
使用例
using Plots gr() begin pss = 6:2:24 plts = [plot(sin; legend_font_pointsize=ps, legend_position=(0.5, 0.5), label=string(ps)) for ps in pss] plot(plts...; layout=(5, 2), size=(640, 780), plot_title="legend_font_pointsize") savefig("legend-font-pointsize.png") end begin rts = 0:30:330 plts = [plot(sin; legend_font_rotation=rt, legend_position=(0.5, 0.5), label=string(rt)) for rt in rts] plot(plts...; layout=(6, 2), size=(640, 780), plot_title="legend_font_rotation") savefig("legend-font-rotation.png") end
次がlegend_font_pointsize
の例です。基本的に凡例のサイズが変わるだけ(投げやり)
次はlegend_font_rotation
の例です。凡例の文字列が360度で一回転する感じで
回転するのですが,90~270度の間は左側の線の例示と被ってしまうので利用は難しいです。
「もしあの設定が有効なら利用可能かも?」というのもあるのですが,凡例では設定を変更しても変わらないというのが分かってきて現在調査中です。
その話はまた次回以降で。