Hi All, I have a panel xyplot with 2 lines in each panel. I'd like to label one line only but don't know how to do this. The code below labels both lines. Any ideas how I could change it to show the y-values of only one of the lines? Many thanks!
xyplot(apples + bananas ~ year | category, data=fruit, as.table=TRUE, par.strip.text=list(cex=1.2,font="bold"), auto.key=list(text=(c("Successful Crops","Unsuccessful Crops")), columns=2, corner=c(1,0)), panel = function(x, y, groups, subscripts, ...) { panel.grid(h = -1,v = 0) grid.text( unit( x, "native") , unit( y, "native") , label =y, gp = gpar( cex = 0.9, fontface="bold"), hjust=c(1,1), vjust=c(-1,-1)) panel.superpose.2(x = x, y = y, groups = groups, subscripts = subscripts,...)}, type = c("p", "o")) [[alternative HTML version deleted]] ______________________________________________ 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.