ggplot2 中 绘图调整刻度线标签的长度

发布时间 2023-11-23 22:48:59作者: 小鲨鱼2018

 

001、基础绘图

library(ggplot2)
p <- ggplot(faithful, aes(x = eruptions, y = waiting)) + 
  geom_point()                          
p                                     ## 基础绘图

 

02、调整刻度线标签的长度

p + theme(axis.ticks.length = unit(.85, "cm"))      ## 调整刻度标签的长度

 。