Description Usage Arguments Author(s) See Also Examples
The two versions of this function are equivalent, but the "underscore" naming is preferred.
This function could turn on/off the automatic use of showtext
functionality. If turned on, any newly opened graphics devices will use
showtext to draw text. This helps to avoid the repeated calls of
showtext_begin()
and showtext_end()
.
1 2 3 | showtext_auto(enable = TRUE, record = TRUE)
showtext.auto(enable = TRUE, record = TRUE)
|
enable |
|
record |
If |
Yixuan Qiu <https://statr.me/>
showtext_begin()
, showtext_end()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ## Not run:
pdf("test1.pdf")
plot(1, main = "\u6b22\u8fce") ## may not render properly
dev.off()
## Automatically use showtext for future devices
showtext_auto()
plot(1, main = "\u6b22\u8fce", family = "wqy-microhei")
pdf("test2.pdf")
plot(1, main = "\u6b22\u8fce", family = "wqy-microhei")
dev.off()
## Turn off if needed
showtext_auto(FALSE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.