1

This code below only plots one emoji in a plot. I am keen to find out if there is a method to have 2 and possibly more in one plot.

library(ggplot2)
library(emoGG)

#Example 1
ggplot(iris, aes(Sepal.Length, Sepal.Width, color = Species)) + geom_emoji(emoji="1f337")

enter image description here

Here is another emoji code 1f697.

zx8754
  • 46,390
  • 10
  • 104
  • 180
Samuel
  • 135
  • 1
  • 9

1 Answers1

3

Here's a pedestrian way of going about this.

ggplot(iris, aes(x = Petal.Width, y = Sepal.Width)) +
  theme_bw() +
  geom_emoji(data = iris[iris$Species == "setosa", ], emoji = "1f337") +
  geom_emoji(data = iris[iris$Species == "virginica", ], emoji = "1f697") +
  geom_emoji(data = iris[iris$Species == "versicolor", ], emoji = "1f63b")

enter image description here

Roman Luštrik
  • 67,056
  • 24
  • 151
  • 191