Skip to content

Instantly share code, notes, and snippets.

@pboesu
Forked from dill/mtcars-cat.R
Last active November 18, 2016 10:47
Show Gist options
  • Select an option

  • Save pboesu/9527bc8e4facbc6f863710af4a440653 to your computer and use it in GitHub Desktop.

Select an option

Save pboesu/9527bc8e4facbc6f863710af4a440653 to your computer and use it in GitHub Desktop.
categorical emojis -- like this Mark?
library(emoGG)
library(ggplot2)
#use subsetting to display different emojis for different factor levels
ggplot(mtcars, aes(wt, mpg))+
geom_emoji(data = mtcars[mtcars$am==1, ], emoji = "1f697") +
geom_emoji(data = mtcars[mtcars$am==0, ], emoji = "1f68c")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment