Bex - 1 year ago 161
LaTeX Question

# Adding maths function in ggplot annotation

I have a density plot using ggplot and I have a mathematical function I want to add on the graph using +annotate() or something similar, but I am not sure how to do this.

The symbol I want in latex code is:

     $f_{\epsilon}(|R_{i}|)$


Thanks for any help :)

try this,

# install.packages("latex2exp")

library(latex2exp)
test <- TeX("$f_{\\epsilon}(|R_{i}|)$")

library(grid)
grid.newpage()
grid.text(test, gp = gpar(cex=4))


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download