ggplot2 icon indicating copy to clipboard operation
ggplot2 copied to clipboard

Should `strip.placement = "outside"` be the default?

Open BajczA475 opened this issue 5 months ago • 3 comments

When you move the strips formed by faceting to the bottom, as in, e.g.:

ggplot(iris, aes(x = Sepal.Length, y = Petal.Length)) +
facet_wrap(~Species, strip.position = "bottom") 

You end up with facet strips that sit in between the axis line and the x-axis labels. I could be entirely alone in this, but I find this ordering perplexing. Is there a particular reason the strips couldn't go to the outside of (beneath) the axis labels? It feels like having those as close to the axis line as possible would always be desirable, and having facet strips instead "interrupt" the connection between them feels off to me.

Presumably, the two rows (and just the relevant columns) in the gtable could get safely swapped if strip.position = "bottom" && x-axis label grobs exist in whatever row that is (11 I think?).

But, again, maybe I'm the only one who thinks the current ordering is strange! 😅

BajczA475 avatar Jul 10 '25 20:07 BajczA475

You can add theme(strip.placement = "outside") to flip the order of axes and strips. I honestly don't know why the current default is the way it is and the outside strip placement makes more sense to me.

teunbrand avatar Jul 10 '25 20:07 teunbrand

Ah, I'd wondered what exactly that toggle did! It's great that there is one, at least.

But yes, it seems to me that the current default is backwards; I would advocate for the default being "outside." I wonder what knock-on consequences such a switch would have, if any?

FWIW, the current order on the top is the same unintuitive configuration, as in, e.g.:

ggplot(iris, aes(x = Sepal.Length, y = Petal.Length)) +
    facet_wrap(~Species, strip.position = "top") +
    scale_x_continuous(position = "top")

So it seems like this isn't a case where "inside" would make more sense in one context but "outside" in another.

BajczA475 avatar Jul 11 '25 12:07 BajczA475

I think this issue sort-of boils down to a petition to change the defaults.

teunbrand avatar Aug 22 '25 08:08 teunbrand