Skip to content

strip.text angle doesn't work when facet_wrap position is "left" or "right" #6489

Closed
@rwilson8

Description

@rwilson8

I found a problem with the angle of strip text when using facet_wrap().

I expected the angle of the strip text to rotate according to the angle argument of the element_text() function in the theme function. The text only rotates when strip.position is "top" or "bottom," not "left" or "right."

Here is the code to reproduce the bug:

library(ggplot2)

p <- ggplot(iris, aes(Sepal.Length, Sepal.Width)) +
  geom_point() +
  theme(strip.text = element_text(angle = 45))

p + facet_wrap(~Species, strip.position = "top")

p + facet_wrap(~Species, strip.position = "left")

p + facet_wrap(~Species, strip.position = "right")

p + facet_wrap(~Species, strip.position = "bottom")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions