switching facet_grid panels stops strip.text from working

Hi there,

I have a ggplot with facets created with facet_grid. I had the labels of the y strips writing in horizontal using angle = 0 in element_text. All good so far. When I switched the panels to the left side of the plot, all the transformations applied with strip.text.y do not work

library (tidyverse)

data(iris) 
tibble(iris) %>% 
  ggplot(aes(x = Sepal.Length, y = Sepal.Width)) +
  geom_point() +
  facet_grid(Species~ Petal.Width <0.3) +
  theme(strip.text.y = element_text(  angle = 0))
## Works nice, text is horizontal

tibble(iris) %>% 
  ggplot(aes(x = Sepal.Length, y = Sepal.Width)) +
  geom_point() +
  facet_grid(Species~ Petal.Width <0.3, switch = "y") +
  theme(strip.text.y = element_text(  angle = 0))

## Switching works, but the strip.text.y does not

Is this a bug? Any other ways of tackling this? (there are other attributes of the text I want to change, like italics and so on that stop working as well)

please avoid double posting on github issues and forums see my response you need to use strip.text.y.left

please accept the answer provided here:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.