Open duttashi opened 6 years ago
Want to write mathematical symbols and expressions in R graphics? You can use an R expression()
instead of normal text, e.g. plot(1:10, main = expression(alpha + beta))
. Below is a demo that shows you everything about plotting math in R (it was written by the R Core Team; see ?plotmath
for details)
If you want to combine multiple mathematical expressions with text, use paste()
inside expression()
Often in plotting scientific diagrams there is a requirement for adding a subscript. The objective is to learn how to add subscripts in a plot using the
ggplot2
library