对于R中的一般情节,legend
用于对数字进行编号.
set.seed(100)
Mydata=rnorm(65)
Year=1950:2014
plot(x=Year,y=Mydata,type = "l")
legend("topleft","(a)",bty = "n")
Run Code Online (Sandbox Code Playgroud)
使用网格可以独立于数据完成:
library(ggplot2)
qplot(Year, Mydata, geom = "line")
library(grid)
grid.text("(a)", 0.15, 0.85)
Run Code Online (Sandbox Code Playgroud)