Main question
Hi, I am new to Makie.jl
for publication-quality vector graphics. I had tried below tutorial but I don’t get how set_theme!
function works.
https://docs.makie.org/stable/documentation/theming/index.html#theming
For example, I understand that there is no optional argument font
or fontfamily
to change all fonts of a whole plot, but we could change one by one. In next plot, I changed the font of title to ‘computer modern’.
using CairoMakie
f = Figure()
ax = Axis(f[1,1], titlefont = "titlefont changed", title = "Computer Modern", xlabel = "Default font")
scatter!(ax, rand(100), rand(100))
save("f.png", f)
This is not perfect and I need global or default setting. Next trial:
set_theme!(titlefont = "Computer Modern")
g = Figure()
bx = Axis(g[1,1], title = "titlefont NOT changed", xlabel = "Default font")
scatter!(bx, rand(100), rand(100))
save("g.png", g)
Of course set_theme!(Theme(titlefont = "Computer Modern"))
doesn’t work. What I missed?
Others
And if you don’t mind, could you answer short questions, please?
- (a)
f = Figure(); ax = Axis(f[1,1])
things are essential? To write title or x,y-labels? - (b) Why
axislegend
is notaxislegend!
? So confused. - (c) Is there any additional documentation consists of what plotting functions return? For example, I know what
lines
orhist
do, but don’t know what they return.
Any answer would be great. Thank you.
Environment
- julia 1.8.5
- CairoMakie v0.10.2
- windows 11