Re: [R] Label individual points in lattice by and ID

2009-12-07 Thread Felix Andrews
xyplot(y~x | f1 + f2, data= dat, groups=ID, type="l", panel= function(x, y,groups, subscripts, ...){ panel.xyplot(x, y, groups = groups, subscripts = subscripts, ...) panel.text(x, y, groups[subscripts]) }) 2009/12/8 Pat Schmitz : > Thanks > > This works, but I lose the ability to say

Re: [R] Label individual points in lattice by and ID

2009-12-07 Thread Pat Schmitz
Thanks This works, but I lose the ability to say plot a line by group connecting the numbered points, how do I recover this, or say color the groups by ID.. xyplot(y~x | f1 + f2, data= dat, groups=ID, type="l", panel= function(x, y,groups, subscripts, ...){ panel.text(x, y, groups[subscripts]

Re: [R] Label individual points in lattice by and ID

2009-12-07 Thread Felix Andrews
If you want to plot each point as the text of its ID, use a panel function: panel = function(x, y, groups, subscripts, ...) panel.text(x, y, groups[subscripts]) If you want to add labels interactively to selected points: xyplot(y~x | f1 + f2, groups=ID,dat) ## repeat for each panel: trellis.focus(

Re: [R] Label individual points in lattice by and ID

2009-12-06 Thread Pat Schmitz
Sorry. My previous code didn't quite display my problem correctly. To make my point more clear, I want to use my "groups" as the label for the point, or rather the point itself. The key becomes illegible with many groups. x<-as.factor(1:5) y<-rnorm(1:10) f1<-c("a","b") f2<-c("x","y") dat<-expa

[R] Label individual points in lattice by and ID

2009-12-06 Thread Pat Schmitz
I am using a plot to inspect data points, and I would like to identify each point with respect to an ID. At issue is that I am producing a faceted plot with many IDs (96) and the key is far to large to accurately identify points by color. 1) Can you direct me on labeling or printing data points by