R语言去除背景色及网格线
2022-01-11 本文已影响0人
不愧是你_a
1.绘制散点图
p <- ggplot(mtcars,aes(mpg,hp,colour=factor(cyl))) + geom_point()
p
图1
2.去除背景色
p + theme_bw()
图2
3.去除网格线
p + theme_bw() +
theme(panel.grid=element_blank())
图3
1.绘制散点图
p <- ggplot(mtcars,aes(mpg,hp,colour=factor(cyl))) + geom_point()
p
图1
2.去除背景色
p + theme_bw()
图2
3.去除网格线
p + theme_bw() +
theme(panel.grid=element_blank())
图3