Skip to content

Instantly share code, notes, and snippets.

@andreabedini
Last active September 22, 2021 03:54
Show Gist options
  • Save andreabedini/65ff9fa41ee1631769f5ea89c7c854c8 to your computer and use it in GitHub Desktop.
Save andreabedini/65ff9fa41ee1631769f5ea89c7c854c8 to your computer and use it in GitHub Desktop.
R Graphics on the terminal with Kitty

base set up:

options(device = function(...) bitmap(file = "|kitty +kitten icat --stdin yes", ...))

with options (eg. anti-aliasing)

options(device = function(...) bitmap(file = "|kitty +kitten icat --stdin yes", taa = 2, gaa = 2, ...))

test with

ggplot(mtcars, aes(mpg, wt)) + geom_point();
dev.off()

Question: is there a way to avoid dev.off()?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment