简体   繁体   English

如何在R中的情节上的文本中包含斜体和下标

[英]How to include italics and subscripts in text on plot in R

I am trying to include some model parameters on a plot in R using 'text' - here is an example: 我正在尝试使用'text'在R中的绘图上包括一些模型参数-这是一个示例:

text(1, 8, "t4 = 3.8")

I would like 't' to be in italics and '4' to be subscript. 我希望“ t”用斜体表示,“ 4”用下标表示。 Does anyone know how to do this? 有谁知道如何做到这一点?

请参阅帮助文件以了解plotmath

text(1, 8, expression(italic(t)[4] == 3.8))

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM