Skip to content

Commit

Permalink
Update code of showing the default size of geom_text() (#6084)
Browse files Browse the repository at this point in the history
  • Loading branch information
yutannihilation committed Sep 6, 2024
1 parent 0d3757d commit eec7490
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vignettes/articles/faq-customising.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -497,10 +497,10 @@ ggplot(mpg, aes(x = hwy, y = cty)) +

### What is the default size of `geom_text()` and how can I change the font size of `geom_text()`?

The default font size of `geom_text()` is 3.88.
The default font size of `geom_text()` is about 3.87.

```{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))`.
Expand Down

0 comments on commit eec7490

Please sign in to comment.