#R grid plots to Cetz

13 messages · Page 1 of 1 (latest)

cyan trout
#

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 :/ )

terse plover
#

What in the flying goose is this!?

#

Please add an example where you use math syntax on the website.

#

This is incredible.

#

Grid cannot do that by default, but they have expr or parse that lets you do a bit.

terse plover
#

God, I cannot believe how neat this is.

#

I have an Rd2typst converter that is vibecoded, if you want to use that for another experiment.

lyric mist
#

Awesome! I guess when working in a Jupyter notebook, it would be possible to set things up so that the cetz code is recorded as an output format together with PNG or SVG, so the notebook can show the PNG/SVG but when importing the output in Typst we can use the cetz code...

cyan trout
#

approaching data vis-UV catastrophe

cyan trout
bleak nebula
#

yes that looks nice

terse plover
#

Omg.

normal surge
#

This is very cool. If I ran into problems are you accepting issues anywhere ? @cyan trout