How to make the legend fontsize larger in Makie.jl?

Example:

julia> fig = Figure()
Scene (512px, 320px):
  0 Plots
  0 Child Scenes

julia> ax = Axis(fig[1,1])
Axis with 0 plots:


julia> lines!(ax, sort(rand(10)), rand(10), label="Plot")
Lines{Tuple{Vector{Point{2, Float32}}}}

julia> axislegend(ax)
Legend()

julia> save("test.png", fig, px_per_unit=2)
CairoScreen{Cairo.CairoSurfaceBase{UInt32}} with surface:
Cairo.CairoSurfaceBase{UInt32}(Ptr{Nothing} @0x00007fcfefa3dd90, 1024.0, 640.0)

(Here the fontsize looks fine, but in our actual plot we’d like it a bit bigger).

Seems like passing labelsize as a keyword argument to axislegend does the trick!

With

axislegend(ax; labelsize=50)

I get

3 Likes