Re: [R] ggplot expressions

2017-03-20 Thread David Winsemius
> On Mar 20, 2017, at 4:42 AM, Troels Ring wrote: > > Dear friends - here is an example of something that I find annoying > > library(ggplot2) > DDF <- data.frame(x=x<-seq(1,10),y=x^2) > G <- ggplot(data=DDF,aes(x=x,y=y)) + geom_point() > GG<-G+ylab(expression(paste("Total ",CO[2]," halved")))

[R] ggplot expressions

2017-03-20 Thread Troels Ring
Dear friends - here is an example of something that I find annoying library(ggplot2) DDF <- data.frame(x=x<-seq(1,10),y=x^2) G <- ggplot(data=DDF,aes(x=x,y=y)) + geom_point() GG<-G+ylab(expression(paste("Total ",CO[2]," halved"))) GG GG+annotate("text",x=5,y=50,label=expression(paste("Total ",CO[