1、

p<-ggplot(mtcars,aes(mpg,hp,colour=factor(cyl)))+geom_point()
p

ggplot2绘图调整x轴、y轴标签及刻度标签的大小

 

 

 

2、调整x轴

p+theme(axis.title.x=element_text(vjust=2, size=20,face = "bold"))

ggplot2绘图调整x轴、y轴标签及刻度标签的大小

 

 

p+theme(axis.text.x=element_text(vjust=1,size=20,face = "bold"))

ggplot2绘图调整x轴、y轴标签及刻度标签的大小

 

 

 3、调整y轴

p+theme(axis.title.y=element_text(vjust=2, size=20,face = "bold"))

ggplot2绘图调整x轴、y轴标签及刻度标签的大小

 

 

p+theme(axis.text.y=element_text(vjust=1,size=20,face = "bold"))

ggplot2绘图调整x轴、y轴标签及刻度标签的大小

 

相关文章:

  • 2021-04-27
  • 2021-06-29
  • 2021-08-07
  • 2022-12-23
  • 2022-12-23
  • 2021-12-23
  • 2021-08-14
  • 2021-10-15
猜你喜欢
  • 2022-12-23
  • 2021-10-18
  • 2021-04-01
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-03
相关资源
相似解决方案