Closed jvcasillas closed 3 years ago
When I use TeX inside of annotate in ggplot2 I get the following warning:
TeX
annotate
Warning message: In is.na(x) : is.na() applied to non-(list or vector) of type 'expression'
Is there a way to get this warning to go away?
Here is a reproducible example:
ggplot(data.frame(x = c(-3, 3))) + aes(x = x) + stat_function(fun = dnorm, n = 100, args = list(mean = 0, sd = 1)) + annotate("text", x = -2, y = 0.2, size = 7, label = latex2exp::TeX("$\\textit{N}(0,1)$"), parse = TRUE)
Disregard. Solved using output = "character"
output = "character"
When I use
TeX
inside ofannotate
in ggplot2 I get the following warning:Is there a way to get this warning to go away?
Here is a reproducible example: