我建立了这个情节:
df_ebf <- df_ebf %>%
map_df(rev)
labels.minor <- c("nie","selten","manchmal", "mehrmals", "oft", "sehr oft", "immerzu")
ggplot(data=df_ebf, aes(x=forcats::fct_inorder(Skalen), y=Werte, group="")) +
geom_line(color = "#003560") +
geom_point(color = "#003560") +
coord_flip() +
labs(x="EBF-Skalen") +
scale_y_continuous(limits = c(0, 6), breaks = c(0,1,2,3,4,5,6), sec.axis = dup_axis(),expand = c(0,0)) +
scale_x_discrete(expand = c(0,0)) +
theme(panel.grid.major.y = element_blank(),panel.grid.minor.x = element_blank(),axis.line.x = element_line(size = 1, colour = "black", linetype=1),axis.title=element_blank())
现在我想用labels.minor在较低的x轴下方添加第二个x轴。