AlgebraOfGraphics.jl icon indicating copy to clipboard operation
AlgebraOfGraphics.jl copied to clipboard

Adjusting fontsize of facet labels

Open sethaxen opened this issue 5 months ago • 1 comments

Problem description

As far as I can tell, there is no way to directly adjust the fontsize of the facet labels. Sometimes the labels I'd like are a little too long, and it would be helpful to be able to adjust this.

Example

Currently the best option is to set the fontsize of the figure, which affects all other font sizes.

julia> using AlgebraOfGraphics, GLMakie

julia> layer = (
           data((; x=[1, 1], y=[1, 1], cat=["Short Name", "Really Long Category Name"])) *
           mapping(:x, :y; col=:cat)
       );

julia> fig = draw(layer; figure=(; size=(350, 200)))

Image

julia> fig = draw(layer; figure=(; size=(350, 200), fontsize=10))

Image

Proposed solution

I'm not certain the most AoG-ish way to do this.

sethaxen avatar May 04 '25 09:05 sethaxen