Emojis in ggplot graphics

[This article was first published on Revolutions, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

R user David Lawrence Miller has created an extension for R's ggplot2 package that allows you to use emojis as plotting symbols. The emoGG package (currently only available on github) adds the geom_emoji geom to ggplot2, which uses an emoji code to identify the plotting symbol. For example:

ggplot(iris, aes(Sepal.Length, Sepal.Width, color = Species)) + 
 geom_emoji(emoji=”1f337″)

Iris_ex-1

(You can look up emoji symbol codes using the emoji_search function.) The package is still in its early days and has some rough edges: legends aren't yet supported, and as you can see in the chart above varying emoji color by a data variable doesn't work. You can, however, create charts including multiple emojis, as in this chart of the mtcars dataset using different symbols for manual and automatic transmission cars:

Mtcars

You can find more information about the emoGG package, including details on how to install it, at its github repository linked below.

github (dill): emoGG

To leave a comment for the author, please follow the link and comment on their blog: Revolutions.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)