Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to rotate the font in Plots.jl

Tags:

julia

plots.jl

How do you rotate the font for xlabel or ylabel in the Julia plotting package Plots.jl?

fo = font(10, "Courier")
fo.rotation = 90
plot(randn(10), xtickfont=fo) # Does nothing
like image 289
Fredrik Bagge Avatar asked Dec 01 '25 02:12

Fredrik Bagge


1 Answers

The keyword arguments to rotate the fonts are

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

More attributes are provided at http://docs.juliaplots.org/latest/attributes/

like image 68
Fredrik Bagge Avatar answered Dec 04 '25 00:12

Fredrik Bagge



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!