这是一个简单的例子。
library(tidyverse)
dat <- data.frame(x = c(1,2,3,4,5),
y = c(1,2,3,4,5))
ggplot(dat, aes(x, y)) +
geom_point(shape="\u2620", size = 8)
这非常适合将头骨和交叉骨创建为形状,如2620 is the hex value for this unicode character。我实际上想要elephant shape, which has the hex code 1F418。
但是,用1F418代替2620会产生错误消息
错误:找不到形状名称:*'8'
为什么大象形状不起作用?如何使大象形状出现在我的绘图中?