Skip to content

Commit 75e3112

Browse files
authored
Mention size.unit option (#5798)
1 parent d8a91ea commit 75e3112

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

vignettes/ggplot2-specs.Rmd

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,8 @@ ggplot(df, aes(1, x)) +
283283

284284
### Font size
285285

286-
The `size` of text is measured in mm. This is unusual, but makes the size of text consistent with the size of lines and points. Typically you specify font size using points (or pt for short), where 1 pt = 0.35mm. ggplot2 provides this conversion factor in the variable `.pt`, so if you want to draw 12pt text, set `size = 12 / .pt`.
286+
The `size` of text is measured in mm by default. This is unusual, but makes the size of text consistent with the size of lines and points. Typically you specify font size using points (or pt for short), where 1 pt = 0.35mm. In `geom_text()` and `geom_label()`, you can set `size.unit = "pt"` to use points instead of millimeters. In addition,
287+
ggplot2 provides a conversion factor as the variable `.pt`, so if you want to draw 12pt text, you can also set `size = 12 / .pt`.
287288

288289
### Justification
289290

0 commit comments

Comments
 (0)