R 删除镶嵌面_包裹中水平轴标签下方的附加线

R 删除镶嵌面_包裹中水平轴标签下方的附加线,r,facet-wrap,R,Facet Wrap,我正在使用geom\u col和facet\u wrap将14个图形绘制在一起。我想知道是否有办法删除水平轴标签下方的水平线 ggplot(df) + geom_col(aes(year, value, fill =as.factor(year)), size=8, width=6.5) + facet_wrap(.~ sector, scales="free_x" ,ncol=14, strip.position="bottom")

我正在使用
geom\u col
facet\u wrap
将14个图形绘制在一起。我想知道是否有办法删除水平轴标签下方的水平线

ggplot(df)  +
    geom_col(aes(year, value, fill =as.factor(year)), size=8, width=6.5) +
    facet_wrap(.~ sector, scales="free_x" ,ncol=14, strip.position="bottom")  +
  ylab("") +
  xlab("") +
  labs(x = "", colour = "") + 
  theme_bw() + 
  theme(panel.grid.major = element_blank(),
    panel.grid.minor = element_blank()) +
  theme(strip.background = element_blank()) +
  theme(axis.line = element_line(),
        strip.background = element_blank(),
        panel.spacing = unit(1, "lines"),
        strip.text = element_text(size = 8, angle = 90, face = "bold",hjust = 1, ),
        axis.text.x.bottom =  element_blank()  ) +
  theme(axis.text.x = element_blank(),
    axis.ticks.x = element_blank(),
    axis.text.y = element_blank(),
    axis.ticks.y = element_blank())  +
  guides(fill=guide_legend(title=" ")) +
  theme(panel.spacing = unit(2, "lines")) +
  theme(panel.spacing.x = unit(0.1, "lines")) +
  theme(panel.spacing.y = unit(2, "lines")) +
  theme(axis.text.x = element_text(color = "black", size = 8, angle = 90, hjust = 1, vjust = 1, face = "bold"))  +
  theme(axis.text.y = element_text(color = "black", size = 8, angle = 0, hjust = 1, vjust = 1, face = "bold")) 

以下是数据:

    df <- structure(list(sector = c("CROP", "CROP", "LIVE", "LIVE", "FORS", 
"FORS", "FOOD", "FOOD", "COAL", "COAL", "OIL", "OIL", "ROIL", 
"ROIL", "GAS", "GAS", "ELEC", "ELEC", "EINT", "EINT", "OTHR", 
"OTHR", "SERV", "SERV", "TRAN", "TRAN", "DWE", "DWE"), year = c(2040, 
2050, 2040, 2050, 2040, 2050, 2040, 2050, 2040, 2050, 2040, 2050, 
2040, 2050, 2040, 2050, 2040, 2050, 2040, 2050, 2040, 2050, 2040, 
2050, 2040, 2050, 2040, 2050), value = c(-13.23, -17.14, 3.41, 
84.26, -9.67, -27.67, -5.09, -16.39, -48.75, -97.59, -37.47, 
-79.16, -39.48, 63.59, -41.97, -90.65, 15.08, 67.9, -5.23, -16.37, 
-6.83, -13.84, -7.06, -16.38, 17.72, 16.43, -4.64, -10.64)), class = c("tbl_df", 
"tbl", "data.frame"), row.names = c(NA, -28L))

df删除此行:
axis.line=element\u line()
或将其更改为
axis.line=element\u blank()