ggplot2基本要素
install.packages("ggplot2")
library(ggplot2)
* 数据(Data)和映射(Mapping)
* 几何对象(Geometric)
* 标尺(Scale)
* 统计变换(Statistics)
* 坐标系统(Coordinante)
* 图层(Layer)
* 分面(Facet)
* 主题(Theme)
theme
install.packages("ggthemes")
library(ggthemes)
theme()函数可以改变字体,字体大小,坐标轴,背景等各种元素
theme(axis.text.x=element_text(face="bold",size=24),//x标签加粗,字号
axis.text.y=element_text(face="bold",size=24),//y标签加粗,字号
axis.title=element_text(face="bold",size=24))//坐标轴名字体加粗,字号