Skip to content

strip.text angle parameter does not work in conjuction with facet_grid switch #4330

@zlskidmore

Description

@zlskidmore

Hi,

I've noticed that it is not possible to rotate strip text when forcing strip text to the left hand side of the plot using facet grid. For example:

ggplot(mtcars, aes(disp, hp)) + geom_point() + facet_grid(cyl~carb, switch="y") + theme(strip.text.y=element_text(angle=90))

ggplot(mtcars, aes(disp, hp)) + geom_point() + facet_grid(cyl~carb, switch="y") + theme(strip.text.y=element_text(angle=0))

does nothing, however removing switch="y" and rotating the text seems fine:

ggplot(mtcars, aes(disp, hp)) + geom_point() + facet_grid(cyl~carb) + theme(strip.text.y=element_text(angle=90))

ggplot(mtcars, aes(disp, hp)) + geom_point() + facet_grid(cyl~carb) + theme(strip.text.y=element_text(angle=0))

ggplot2 version is 3.3.2

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