R语言中绘制弧形箭头并添加文字

 

001、测试01

library(ggplot2)

ggplot(data.frame(x = c(1, 3), y = c(1, 3)), aes(x = x, y = y)) +
  geom_point() +
  geom_curve(aes(x = 1.5, y = 2.5, xend = 2.6, yend = 2.6),          ## 绘制弧形箭头
             curvature = 0.3,  size = 5, col = "red",
             arrow = arrow(length = unit(0.3, "inches"),
                           ends = "both"),
             lineend = "round") +
annotate("text", x = 2.0, y = 2.5, label = "Siberian ibex",          ## 添加文字
         colour = "black", size = 10 )

 

。 

 

posted @ 2024-05-31 16:26  小鲨鱼2018  阅读(50)  评论(0编辑  收藏  举报