Using ggplot I'm trying to add unique text to each facet in the plot below with geom_text but the horizontal position of the text is different in each. I want the text to be placed in the upper left corner of each facet. The first ten rows of the data set are listed below. Much thanks in advance for any help this question receives.
FM x PC Suitability Output
1 Max 3.349 71.6 avg 9.20e-06
2 Max 3.997 71.6 avg 9.69e-06
3 Max 4.645 71.6 avg 1.02e-05
4 Max 5.293 71.6 avg 1.08e-05
5 Max 5.941 71.6 avg 1.13e-05
6 Max 6.589 71.6 avg 1.19e-05
7 Max 7.237 71.6 avg 1.26e-05
8 Max 7.885 71.6 avg 1.32e-05
9 Max 8.533 71.6 avg 1.39e-05
10 Max 9.181 71.6 avg 1.47e-05
p = ggplot(y1, aes(x, Output, group=FM, linetype=Suitability, size =
Suitability)) + geom_line(aes(group=Suitability)) +
facet_grid(~FM, scales = "free_x", ncol=2)+ scale_linetype_manual(values =
c("solid","dashed","dashed"))+ scale_size_manual(values=c(.6,.5,.5))+
ylab("Prediction Values\n")+ xlab("\nRange of Values")+
theme(axis.text=element_text(size=9))+ theme_bw()+
theme(panel.border = element_blank(), axis.line =
element_line())+theme(legend.position="none")
perc <- ddply(.data=y1, .(FM),summarize, n=paste(PC))
p+geom_text(data=perc, aes(x=.25, y=1,label=n), colour="black",
inherit.aes=FALSE)