Erica
Erica

Reputation: 125

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?

Upvotes: 3

Views: 2864

Answers (1)

A. Webb
A. Webb

Reputation: 26456

See the helpfile for plotmath

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

Upvotes: 4

Related Questions