ggplot2绘图调整x轴、y轴标签及刻度标签的大小
1、
p<-ggplot(mtcars,aes(mpg,hp,colour=factor(cyl)))+geom_point()
p
2、调整x轴
p+theme(axis.title.x=element_text(vjust=2, size=20,face = "bold"))
p+theme(axis.text.x=element_text(vjust=1,size=20,face = "bold"))
3、调整y轴
p+theme(axis.title.y=element_text(vjust=2, size=20,face = "bold"))
p+theme(axis.text.y=element_text(vjust=1,size=20,face = "bold"))