您可以使用text 代替mtext。一个好处是如果你必须放大中间的某个字母,你可以将整个文本分成两组,然后使用strwidth找出你想要放大的字母的位置。在这种情况下,由于您要放大的字母在开头,因此您只需两步就可以写出整个文本。首先在某个 x 和 y 处写下较长的文本,然后在开头写上适当的 adj 和 cex。阅读adj?text。
graphics.off()
par(family = "serif")
plot(1:10, ty='n')
text(x = 2, y = 6, labels = bquote(italic("")*(.(11))*" = "*.(2.78)* ", "*italic("p")*" = "*.(.032)*","*italic("d")*" = "*.(.66)*", " *"95% "*CI[~italic((d))]* " ["*.(.42)*", "* .(1.23)*"]" ), adj = 0, cex = 1.5)
text(x = 2, y = 6, labels = expression(italic("t")), adj = c(1, 0.2), cex = 5)
为了说明我能够在中间放大字母的意思,这里是一个我在中间放大“p”的例子
graphics.off()
windows(width = 8, height = 6, pointsize = 10)
par(family = "serif")
plot(1:10, ty='n', asp = 1)
text(x = 1, y = 6, labels = bquote(italic("t")*(.(11))*" = "*.(2.78)* ", "), adj = 0, cex = 1.5)
w1 = strwidth(bquote(italic("t")*(.(11))*" = "*.(2.78)* ", "), cex = 1.5)
text(x = 1+w1, y = 6, labels = bquote(italic("p")), adj = 0, cex = 5)
w2 = strwidth(bquote(italic("p")), cex = 5)
text(x = 1+w1+w2, y = 6, labels = bquote(" = "*.(.032)*","*italic("d")*" = "*.(.66)*", " *"95% "*CI[~italic((d))]* " ["*.(.42)*", "* .(1.23)*"]" ), adj = 0, cex = 1.5)