On 5/9/2014 2:07 PM,
adam.lovelan...@public.gmane.org wrote:
> Hi,
>
> Can you use stat_summary along with geom_text in order to label the
> position(s) of certain location?
>
> For example, I expected the following code to label the point, (5,5) and
> no others, but it labels all of them.
>
> Is there an easy way to do the same thing, without figuring out the
> location outside of ggplot2?
>
> tst<-data.frame(x=1:5,y=1:5,z=c("a","b","c","d","e"))
>
> ggplot(tst,aes(x,y))+
> geom_point()+
> stat_summary(fun.y="max",geom="text",aes(label=z))