You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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:
paulrougieux
changed the title
X axis appears below facet_wrap plot with uneven number of facets
X axis doesn't appear below facet_wrap plot with uneven number of facets
Apr 8, 2016
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.
install.packages("devtools")
Devtools installs packages directly from a github repository instead of from CRAN.
You also need to install the development version 0.4.1. of the scales packages:
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: