julia - 如何在 Plots.jl 中旋转字体

标签 julia plots.jl

如何在 Julia 绘图包 Plots.jl 中旋转 xlabelylabel 的字体?

fo = font(10, "Courier")
fo.rotation = 90
plot(randn(10), xtickfont=fo) # Does nothing

最佳答案

旋转字体的关键字参数是

plot(..., xrotation = 45) # For 45 degree rotation
plot(..., yrotation = 45)
plot(...,  rotation = 45) # Rotates both x and y fonts

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

关于julia - 如何在 Plots.jl 中旋转字体,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61931507/

相关文章:

julia - 使用 Plots 在 Julia 中绘制 DataFrames

julia - 我可以将 ColorGradient 中的特定值分配给标记吗?

julia - Julia 中使用 Plots.jl 的多个直方图

performance - 为什么这个版本的矩阵复制这么慢?

julia - 用牛虻为单条线着色

regex - 在 Julia 中加入正则表达式

julia - 如何使用 Plots.jl 在图像上绘图?

latex - 剧情+ Julia + latex

julia - Julia 中的 3D 曲面图

arrays - 在 Julia 中按多个键对 Dict 数组进行排序