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
  • 52,746
  • 12
  • 114
  • 209
Samuel
  • 155
  • 1
  • 10

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
  • 69,533
  • 24
  • 154
  • 197