hi, On Sat, Oct 17, 2009 at 02:04:43PM -0700, John Kane wrote: > Putting names on a ggplot > > p <- p + geom_text(aes(x = namposts + 2.5, y = temprange[2], label = mlabs), > data = year, size = 2.5, colour='black', hjust = 0, vjust = 0) >
you shouldn't use aes in this case since nampost, temprange, ... are not part of the dataframe year. It should also work with geom_text i guess, but I prefere annotate for thinks like that: p + annotate("text",x=namposts+2.5, y = temprange[2], label = mlabs,size=2.5, colour='black', hjust = 0, vjust = 0) regards, stefan ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.