在R中的ggplot文本中添加箭头符号

Bin*_*ggg 3 text symbols r arrows ggplot2

我最近发现可以在ggplot中的注释文本中添加希腊字母和其他符号.我正在尝试向我的文本添加箭头(向上和向下),我似乎找不到正确的数字代码.我尝试搜索但无法在线查找代码列表.语法类似于标签下的语法:

label="'test text ' * symbol('\\205')"
Run Code Online (Sandbox Code Playgroud)

\ 142给出一个beta符号,\ 154给出一个伽马符号.谁知道这段代码是如何工作的?谢谢!

esp*_*lli 6

以下作品:

ggplot(mpg, aes(displ, hwy)) +
  geom_point() +
  geom_smooth(aes(colour = "loess"), method = "loess", se = FALSE) +
  geom_smooth(aes(colour = "lm"), method = "lm", se = FALSE) +
  labs(colour = "Method") +
  annotate("text", x = 3.5, y = 35, label = sprintf('\u2191')) +
  geom_curve(aes(x = 4, y = 30, xend = 3.5, yend = 34), 
             colour = "#FF0000", 
             size=0.5, 
             curvature = -0.2,
             arrow = arrow(length = unit(0.03, "npc"))) +
  geom_label(aes(x = 4, y = 31, label = "Here is the\nUnicode symbol"), 
             hjust = 0, 
             vjust = 0.5, 
             colour = "#FAAB18", 
             fill = "white", 
             label.size = NA, 
             family="Helvetica", 
             size = 6)
Run Code Online (Sandbox Code Playgroud)

此处为箭头的Unicode