Created
April 17, 2019 06:32
-
-
Save djnavarro/12a91f50943aaeb953a1ca1b21102c30 to your computer and use it in GitHub Desktop.
gganimated version of ASCII Bayes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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