-
Notifications
You must be signed in to change notification settings - Fork 2.1k
facet plots: strip.text.y & strip.position = 'left' not accepting angle argument #3888
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
Comments
Just adding a reprex with the rendered plots library(tidyverse)
ggplot(mpg, aes(displ, hwy)) +
geom_point() +
facet_wrap(~cyl, strip.position = 'right') +
theme(strip.text.y = element_text(angle=45)) ggplot(mpg, aes(displ, hwy)) +
geom_point() +
facet_wrap(~cyl, strip.position = 'left') +
theme(strip.text.y = element_text(angle=45)) Created on 2020-03-11 by the reprex package (v0.3.0.9001) |
This works. library(ggplot2)
ggplot(mpg, aes(displ, hwy)) +
geom_point() +
facet_wrap(~cyl, strip.position = 'left') +
theme(strip.text.y.left = element_text(angle=45)) Created on 2020-03-11 by the reprex package (v0.3.0) |
I suspected as much, but it wasn't in autosuggest, so I thought it didn't exist 🙃 |
Not sure whether the other code should work also. I'll leave that for somebody else to decide. |
I think the main “issue” is that the vertical strips have different rotation for left and right by default and as such you have to overwrite it at that level for it to go into effect. |
Thank you @clauswilke , I didn't know about strip.text.y.left. |
I am seeing the same issue with facet_grid. The accepted answer provided in this Stackoverflow question does not work anymore. Code:
|
Yes, this change was introduced deliberately in #3683. I think we didn't mention this in the changelog and we should have. I have edited the SO answer so it's correct now. @rbreejen Note that the previous working code had an obvious flaw: You had to specify @thomasp85 Can we retroactively add a news item to the 3.3.0 release? Or should we add it to 3.3.1 but point out the change happened already in 3.3.0? The second seems cleaner to me. |
Let’s add it to 3.3.1 |
Thanks for this fix, I have been reviewing both this and #3896 tickets and I think it should make sense to add |
Hi, thanks for all your work on ggplot2; first issue report for me. I recently updated to ggplot2 3.3.0 and my code to produce facet maps with facet strips on the left no longer seems able to produce text the right way up. Reprex below
The text was updated successfully, but these errors were encountered: