I've been toying with a R graphics device that outputs Cetz:
https://baptiste.codeberg.page/gridcetz/
https://baptiste.codeberg.page/gridcetz/articles/ggplot-examples.html
Most examples closely match the reference, just a couple of minor scaling issues, and the absence of clipping to viewports. Rasters are implemented as a place(image(bytes))) workaround.
It's neat to be able to pass all the typography to typst, and also to be able to override defaults (e.g set all text to colours)
I know quite a bit of R graphics (a couple of decades working with it and developing packages) so I think the code is reasonably sound, but, full disclaimer, I used LLMs to write most of this code (there's no way I would have found time for this side project. Yes, I hate it :/ )
Converts grid graphics (grobs and viewports) directly to CeTZ drawing commands for use in Typst documents, analogous to what gridSVG does for SVG. By walking the grid display list rather than going through a graphics device, gpar() fields that were not explicitly set by the user are omitted from the output, allowing Typst-level #set rules to pro...