The The R Primer logo Primer

Include Greek letters in plots

You want to add Greek letters or equations in titles, labels or text on a plot

Solution: Greek letters, super- or subscript, and mathematical equations are easy to include in titles, labels or text-drawing functions. If the text argument to one of the functions that draw text is an expression, then the argument is formatted according to TeX-like rules. The use of expressions is seen in the following example where the x label includes the Greek letter mu with subscript i.

> plot(1, 1, xlab=expression(mu[i]))
See rule 4.1 in The R Primer for more information or look at the help page for plotmath.

Back to tips.