Skip to content
Prev 172431 / 398502 Next

ggplot2: annotated horizontal lines

On 3 Mar 2009, at 18:41, baptiste auguie wrote:

            
Well, firstly I hadn't thought to use it. Ooops.

Secondly, I can't make it just do a single value - it seems to want a  
value for every point in the dataset, e.g.:

 >  qplot( wt, mpg, data=mtcars ) +  
geom_text(mapping=aes(x=1,y=0,label=paste("0.5"),vjust=-1))
Error in data.frame(..., check.names = FALSE) :
   arguments imply differing number of rows: 1, 32

Cheers,
dave