View source: R/ggplot2-annotations.R
zerowidth_char | R Documentation |
Helper function for adjusting paragraph margins for use with ggtext/gridtext, which does not natively support margin/padding styles.
zerowidth_char(size = 12, units = "px")
size |
Size of the zero-width character |
units |
Defaults to |
The zero-width unicode character only ever takes up vertical space, so when placed in-line its size determines the amount of "top-margins" for the paragraph. This allows finer control over spacing.
A string
## Not run:
library(ggtext)
ggplot() +
geom_richtext(aes(0, 0, label = "This is a line<br><br>This is a paragraph<br>of text."))
ggplot() +
geom_richtext(aes(0, 0, label = paste0(
"This is a line<br>",
zerowidth_char(30),
"This is a paragraph<br>of text."
)))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.