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"), par.settings = list(superpose.polygon = list(cex .8,col=c("lightblue","fuchsia"))), auto.key=list(text=(c("Applications","Success")), columns=2, corner=c(1,0)), scales=list(x=list(alternating=3),y=list(alternating=3)), 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]]
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]]
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 on 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")) -- View this message in context: http://www.nabble.com/xyplot---label-one-line-tp22935488p22935488.html Sent from the R help mailing list archive at Nabble.com.