Add Text with Expressions to Plot in R (Example Code)

In this tutorial you’ll learn how to annotate a text with expressions to a plot in the R programming language.

Example: Concatenating Character String & Expressions in Text of Graphic

plot(1:5,                     # Adding main title with expressions
     main = expression("Some Text"[lambda] ~ alpha ^ 2 ~ "More Text" ^ 3))

r graph figure 1 add text expressions

Related Articles & Further Resources

Here, you may find some additional resources on topics such as extracting data, RStudio, and character strings.

Leave a Reply

Your email address will not be published.

Fill out this field
Fill out this field
Please enter a valid email address.
You need to agree with the terms to proceed

Menu
Top