001、测试基本绘图
data=iris ## 导入数据 library(ggplot2) ## 加载包 ggplot(data = data, aes(x=Petal.Length,y=Sepal.Length)) + ## 基本绘图程序 geom_point()
002、清除灰色背景、背景框线、上框线、右框线
data=iris library(ggplot2) library(cowplot) ## 使用cowplot包 ggplot(data = data, aes(x=Petal.Length,y=Sepal.Length)) + geom_point() + theme_cowplot() ## 增加 + theme_cowplot()语句