This is a variant of this question and this question that I haven't found a solution to.
Using mtcars
as an example I want a plot similar to the following
ggplot(mtcars, aes(x=cyl,y=mpg)) +
geom_point() +
facet_grid(am ~ gear + carb)
However, I want the facet x labels associated with the "carb" variable to be removed while keeping the label for the "gear" variable. The following gets at what I want, but puts "NA" in it's place rather than completely removing it.
ggplot(mtcars, aes(x=cyl,y=mpg)) +
geom_point() +
facet_grid(am ~ gear + carb, labeller = labeller(carb = "")
Of course, using theme(strip.text.x = element_blank())
doesn't work for me either since I want to keep the label for the "gear" variable.
Ultimately, I want to grid using both x layers but for me the label for the second x layer doesn't hold any meaning so it's distracting to include in the plot.