Skip to content

fix(facet): Honor facet size in draw!#770

Merged
jkrumbiegel merged 2 commits into
masterfrom
jk/draw-facet-size
Jun 16, 2026
Merged

fix(facet): Honor facet size in draw!#770
jkrumbiegel merged 2 commits into
masterfrom
jk/draw-facet-size

Conversation

@jkrumbiegel

Copy link
Copy Markdown
Member

facet = (; size = FacetSize(...)) worked with draw but errored with draw!:

df = (; x = repeat(1:5, 10), y = rand(50), g = repeat(string.(1:10), inner = 5))
plt = data(df) * mapping(:x, :y, layout = :g) * visual(Lines)

draw!(Figure(), plt; facet = (; size = FacetSize(2.0, (nr, nc) -> 100)))
# MethodError: no method matching clean_facet_attributes(...; size::FacetSize)

_draw! never forwarded facet to compute_axes_grid, so the FacetSize was neither applied to the axis width/height nor used for the wrap layout, and the :size key leaked into clean_facet_attributes. Now plot! forwards facet and _draw! strips :size before facet!, mirroring the non-mutating draw path.

Also bumps the version to v0.12.13.

`draw!(fig, d; facet = (; size = FacetSize(...)))` errored because the
`:size` key was never consumed: `_draw!` did not forward `facet` to
`compute_axes_grid`, so the axis width/height were not applied, and the
key leaked into `clean_facet_attributes` as an unsupported keyword.

`Makie.plot!` now forwards `facet` to `compute_axes_grid` and `_draw!`
strips `:size` before `facet!`, mirroring the non-mutating `draw` path.

Also prepares the v0.12.13 release.
@jkrumbiegel jkrumbiegel enabled auto-merge (squash) June 16, 2026 09:21
@jkrumbiegel jkrumbiegel merged commit fe88dbf into master Jun 16, 2026
8 checks passed
@jkrumbiegel jkrumbiegel deleted the jk/draw-facet-size branch June 16, 2026 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant