Using latex2exp

I'm trying to learn to use latex2exp to add some LaTeX in plots. I don't see how to include the value of a variable in the LaTeX expression. Suppose I have

and want to display \beta = 3 (but with a Greek beta and the value of b rather than literally typing in 3.)

Or is there a better approach than latex2exp?

There is a partial answer to my question at r - How to annotate a ggplot2 plot with latex2exp using variables? - Stack Overflow.

b <- 3
title <- TeX(paste("$\\beta=$",b))

I would still be pleased to learn about any better/other solutions.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.