This thread has lead me to this nice wiki on adding greek symbols in ggplot
. The code below gives alpha and beta a value in the legend. What do I have to do if I want to add more than one greek symbol for the same data point in the legend? For example "alpha =1, gamma = 2"?
d <- data.frame(x=1:10,y=1:10,f=rep(c("alpha","beta"),each=5), stringsAsFactors=FALSE)
value <- 3.1415
my.labs <- list(bquote(alpha==.(value)),bquote(beta==.(value)))
qplot(x,y,data=d,colour=f) +
scale_colour_manual(values=1:2,breaks=c("alpha","beta"),
labels=my.labs)