r - How to include a \perp symbol in a ggplot2 annotation? -
i put annotation : e \perp c using ggplot2
annotate("text", label = ...)
.
i searched quite thorougly on web managed lone symbol using annotate("text", label = "symbol('\136')", parse = t)
.
does have solution ?
plotting code page:
p <- ggplot(df, aes(x = gp, y = y)) + geom_point() + geom_point(data = ds, aes(y = mean), colour = 'red', size = 3) p+geom_text( aes(x="b", y=-0.4, label = "e(y)*symbol('\\136')*b" ), parse = true)
after getting work able annotate(text"...)
working:
p+annotate("text", 1, -0.4, label="e(y)*symbol('\\136')*b", parse=true)
the tricks: mix quoting characters did use plotmath syntax i'm guessing might not have used.
edit: *
not quoting character. if anything, should called linking character. in plotmath syntax every "atom" or function call needs separated (or "linked-to" depending on how view it) adjoining atoms/functions. can *
(the no-space separator/linker), ~
(the spacing separator/linker), or of dyadic operators in plotmath vocabulary, examples including +
, -
, ==
, !=
.
Comments
Post a Comment