在一个 for 循环,你必须明确 print 你的结果 ggplot 对象:
for
print
ggplot
for (i in 1:5) { print(ggplot(df,aes(x,y))+geom_point()) }