I have looked here but still can\'t figure it out. How do I change the strip.text.x labels in a ggplot with faceting? Specifically I am using facet_grid with margins. The st
You can customize the facet labels by giving labeller function:
f <- function(x, y) { if (x == "speed") c(y[-length(y)], "Total") else y } ggplot(cars, aes(x = dist)) + geom_bar() + facet_grid(. ~ speed, margin = TRUE, labeller = f)