Skip to content

Fix missing default setting for angles in element_grob.element_text(). Closes #2544. #2557

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

Merged
merged 1 commit into from
May 7, 2018

Conversation

clauswilke
Copy link
Member

This closes #2544.

library(ggplot2)                                                                                                                                                       
ggplot(iris, aes(x = Sepal.Length, y = Petal.Length, color = Species)) +                                                                                               
  geom_point() +                                                                                                                                                         
  scale_color_discrete(guide = guide_legend(label.theme = element_text(face = "italic")))                                                                                

screen shot 2018-05-07 at 12 12 05 pm

ggplot(iris, aes(x = Sepal.Length, y = Petal.Length, color = Species)) +                                                                                               
  geom_point() +                                                                                                                                                         
  scale_color_discrete(guide = guide_legend(title.theme = element_text(face = "italic")))     

screen shot 2018-05-07 at 12 12 17 pm

Both examples look a bit weird because the font size isn't specified. Once we specify font size as well, things look as expected.

@hadley hadley merged commit 756dfa5 into tidyverse:master May 7, 2018
@hadley
Copy link
Member

hadley commented May 7, 2018

Thanks!

@clauswilke clauswilke deleted the angle-default branch May 10, 2018 15:47
@lock
Copy link

lock bot commented Nov 6, 2018

This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/

@lock lock bot locked and limited conversation to collaborators Nov 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No default angle in element_text when using label.theme and title.theme in guide_legend leads to error when setting other parameters
2 participants