Skip to content
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

Update code of showing the default size of geom_text() #6084

Merged

Conversation

yutannihilation
Copy link
Member

Copy link
Collaborator

@teunbrand teunbrand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me, but I noticed the following:


```{r}
GeomLabel$default_aes$size
get_geom_defaults(geom_text)$size
```

You can change the size using the `size` argument in `geom_text()` for a single plot. If you want to use the same updated size, you can set this with `update_geom_defaults()`, e.g. `update_geom_defaults("text", list(size = 6))`.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we recommend theme(geom = element_geom()) instead of update_geom_defaults()?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that's the question... In general, should update_geom_defaults() be soft-deprecated after the next release? I think theme(geom = element_geom()) is more preferable in more cases, but we need to discuss and decide what the official recommendation should be.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah good point, I've made #6085 as a breakout for discussing this

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Let's discuss there.

@yutannihilation yutannihilation merged commit eec7490 into tidyverse:main Sep 6, 2024
13 checks passed
@yutannihilation yutannihilation deleted the doc/default-font-size branch September 6, 2024 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants