Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request add strip.background.y and strip.background.x ? #2249

Closed
smouksassi opened this issue Aug 25, 2017 · 1 comment
Closed

Feature request add strip.background.y and strip.background.x ? #2249

smouksassi opened this issue Aug 25, 2017 · 1 comment
Labels
facets 💎 feature a feature request or enhancement themes 💃

Comments

@smouksassi
Copy link

With the switch argument and strip placement one might want to color the x and y facets differently e.g. below there is no way to keep the y facets gray while coloring the x ones white

ggplot(mtcars, aes(cyl,disp))+
facet_grid(vs~am,switch="x")+
theme(strip.placement="outside",
strip.background=element_rect(fill="gray"))
@karawoo karawoo added facets 💎 feature a feature request or enhancement themes 💃 labels Aug 25, 2017
@hadley
Copy link
Member

hadley commented Nov 8, 2017

Pretend reprex:

df <- data.frame(x = 1:2, y = 1:2)
ggplot(df, aes(x, y)) +
  facet_grid(x ~ y) +
  theme(
    strip.background.x = element_rect(fill = "red"),
    strip.background.y = element_rect(fill = "green")
  )

@hadley hadley closed this as completed in c6cc383 Nov 8, 2017
@lock lock bot locked as resolved and limited conversation to collaborators Jun 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
facets 💎 feature a feature request or enhancement themes 💃
Projects
None yet
Development

No branches or pull requests

3 participants