I am looking for something similar. In my case, I do have 6 different labels on the x axis - let it be "January", "February", "June", "July" and "September", "October". As you can see, 2 months can always be grouped into one season: "Winter", "Summer" and "Autumn". I have six values (one for each month), let it be temperature. Now my x-Axis has 6 ticks and labels. I would, however, like to add a second axis with "Winter" appearing below "January" and "February" and so on. Any idea on how that could work?
Here's my code so far:
p1 <- ggplot(df, aes(colour=group, y= temperature, x= month))
p1 <- p1 + geom_point(aes(shape=c("15", "15", "16", "16", "17", "17")),size = 1.5)+
geom_errorbar(limits2, width=0.1, size = 0.5) +
scale_y_continuous(limits=c(0,5), name = "Temperature")+
theme(axis.title.y = element_text(vjust=0.4))+
scale_x_discrete(name = "MONTH", labels=c("January", "February", "June", "July", "September", "October"))+
theme(axis.title.x = element_text(vjust=-0.2))
p1
Thanks so much!