如何在 Plots.jl 中旋转字体

Fre*_*gge 3 julia plots.jl

如何旋转 Julia 绘图包 Plots.jl 的xlabel字体ylabel

fo = font(10, "Courier")
fo.rotation = 90
plot(randn(10), xtickfont=fo) # Does nothing
Run Code Online (Sandbox Code Playgroud)

Fre*_*gge 5

旋转字体的关键字参数是

plot(..., xrotation = 45) # For 45 degree rotation
plot(..., yrotation = 45)
plot(...,  rotation = 45) # Rotates both x and y fonts
Run Code Online (Sandbox Code Playgroud)

http://docs.juliaplots.org/latest/attributes/提供了更多属性