X axis doesn't appear below facet_wrap plot with uneven number of facets #1607
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
It's possible to add an axis under all plots by setting the scales argument to "free_x".
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?
The text was updated successfully, but these errors were encountered:
This issue has now been fixed in the development version of ggplot2. To those coming from the Stackoverflow question and wondering how to get this version. You need the devtools packages.
Devtools installs packages directly from a github repository instead of from CRAN.
Then try to generate the example plot I reported in my issue:
This plot should have an x axis under each of the 3 panels.