I am trying to figure out a neat way to remove unused factors from a facet in ggplot2. Here is a minimal example
# DUMMY DATA mydf = data.frame( x = rpois(
I think all you need is scales = "free_y":
scales = "free_y"
p0 = ggplot(mydf, aes(x = x, y = y)) + geom_point() + facet_wrap(~ cat, ncol = 1,scales = "free_y") p0