简体   繁体   中英

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(1, 8, "t4 = 3.8")

I would like 't' to be in italics and '4' to be subscript. Does anyone know how to do this?

请参阅帮助文件以了解plotmath

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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