-
Notifications
You must be signed in to change notification settings - Fork 2k
Plotmath
baptiste edited this page Aug 30, 2010
·
4 revisions
library(ggplot2)
p = ggplot(data.frame(x=1,y=1,label="alpha"))
p + geom_text(aes(x,y,label=label))
## use the parse argument to interpret the plotmath expression
( p2 = p + geom_text(aes(x,y,label=label), parse=TRUE) )
p2 + xlab(expression(beta)) + opts(title = expression(gamma))
qplot(x,y, data=data.frame(x=1:2,y=1:2, f = factor(c("alpha","beta"))), geom="point") +
facet_grid(.~f, labeller= label_parsed)