Ich habe folgendes versucht, aber es für mich nicht funktioniert:Wie wird +/- plus minus Operator in Text Annotation des Plots (ggplot2) platziert?
a <- ggplot()
a <- a + geom_point(aes(x=seq(0,1,0.1), y=seq(0,1,0.1)))
a <- a + annotate("text", x=0.5, y=0.3, label="myplot")
a <- a + annotate("text", x=0.5,y=0.2,label=expression(%+-%))
Ich habe versucht, auch die folgenden, wie durch How to annotate() ggplot with latex ohne Glück wies darauf hin:
a <- a + annotate("text", x=0.5, y=0.1, label="%+-%", parse=TRUE)
Und das doesn‘ t Arbeit entweder:
a <- a + annotate("text", x=0.5, y=0.1, label="\pm", parse=TRUE)
Phantom funktioniert auch, obwohl es fast vollständig – rawr
Lesen undokumentiert und Re-Lektüre der plotmath Seite notwendig. Und tatsächlich ist es 'phantom()', das benötigt wird. –