Only show one variable label in facet_wrap strip text?

Viewed 2529

I am plotting multiple graphs using facet_wrap() from the ggplot2 package in R. When facetting by multiple variables, the result includes both labels in the strip text. How can I remove one?

In this toy example from the mpg dataset, how to keep the cyl labels only? Thanks

ggplot(mpg, aes(displ, hwy)) +
  geom_point() +
  facet_wrap(c("cyl", "drv"))

enter image description here

1 Answers
Related