Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
gganimated version of ASCII Bayes
library(tidyverse)
library(asciify)
library(gganimate)
p <- ascii_data("bayes.png") %>%
ascii_map(
alphabet = as.character(0:9),
rescale = .15) %>%
ascii_plot(charsize = 4)
a <- p + transition_filter(
f0 = label == "0",
f1 = label == "1",
f2 = label == "2",
f3 = label == "3",
f4 = label == "4",
f5 = label == "5",
f6 = label == "6",
f7 = label == "7",
f8 = label == "8",
f9 = label == "9",
keep = TRUE
) +
exit_recolour(colour = "grey60")
animate(a, type = "cairo", width = 800, height = 480)
anim_save("~/../Desktop/bayesian_filtering.gif")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.