Description
When drawing a plot with facet_wrap. If there is an uneven number of facets, the x axis is not drawn for facets which do not touch the "floor" of the plotting area. For example
ggplot(airquality, aes(x = Day, y = Temp)) +
facet_wrap(~Month) +
geom_line()
It's possible to add an axis under all plots by setting the scales argument to "free_x".
ggplot(airquality, aes(x = Day, y = Temp)) +
facet_wrap(~Month, scales = "free_x") +
geom_line()
But it's not possible to add an x axis only for the last dangling plot alone. This axis could be located in two places, right below the dangling plot:
or at the bottom of the plotting area:
A workaround was given in this Stackoverflow answer. The author said a suggestion could be submitted here. 2 years after those comments were made on Stackoverflow, no suggestion has been submitted here on github. Considering the number of votes on the workaround answer, the issue still attracts interest. I thought I'd request your feedback. Could this feature be implemented, with minimal change to ggplot2, or is this out of the question?