一 绘制基础图
library(ggplot2)
p <- ggplot(mtcars, aes(x = wt, y = mpg)) +
geom_point()
?...更多参数ggplot2|详解八大基本绘图要素,主题ggplot2|theme主题设置,详解绘图优化-“精雕细琢”,图例ggplot2 |legend参数设置,图形精雕细琢 可参考。...如果待注释的text太多,可使用ggrepel包解决标签太多导致的重叠问题
ggplot2-plotly|让你的火山图“活”过来
2.2 点注释
1)添加点
p + annotate(geom = "...2.3 线 , 矩形注释
1) 添加矩形,给出边的范围
p + annotate("rect", xmin=2, xmax=3, ymin=20 , ymax=30,
alpha...p + annotate("segment", x = 1, xend = 3, y = 25, yend = 15,
colour = "purple", size=3, alpha