Emojis in ggplot graphics

November 30, 2015
By

(This article was first published on Revolutions, and kindly contributed to R-bloggers)

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 on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.

Sponsors

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)