标签: r plot plotmath
我想知道如何仅使d中的主要字text()以斜体显示,但下标字"unbiased"保持为普通文本?
d
text()
"unbiased"
请参阅下图中的R代码。
这是我的R代码:
plot(1:10, ty="n") text( 4, 4.5, bquote(italic(d[(unbiased)])), cex = 5)
答案 0 :(得分:1)
保持"不偏不倚"在italic之外或使用plain:
italic
plain
plot(1:10, ty = "n") # original text(5, 4, bquote(italic(d[(unbiased)])), cex = 5) # use plain text(5, 6, bquote(italic(d[(plain(unbiased))])), cex = 5) # keep "unbiased" outside italic text(5, 8, bquote(italic(d)[(unbiased)]), cex = 5)