Re: [R] Highlighting different series with colors

2008-02-27 Thread Valentin Bellassen
Thanks, it works fine except that 7 colors are repeated twice (so that one color corresponds to two types). I tried the following but it makes things worse: the legend disappears and I get only 4 different colors: pan<-function(x,y) { panel.superpose(x,y,subscripts=coef$country,groups=coef$countr

Re: [R] Highlighting different series with colors

2008-02-26 Thread Michael A. Miller
> "Valentin" == Valentin Bellassen <[EMAIL PROTECTED]> writes: > Hello, I have a data frame with 3 vectors $x, $y, and > $type. I would like to plot $x~$y and having different > colors for the corresponding points, one for each level of > $type. Would someone know how to do tha

Re: [R] Highlighting different series with colors

2008-02-25 Thread Ben Bolker
Valentin Bellassen lsce.ipsl.fr> writes: > > Hello, > > I have a data frame with 3 vectors $x, $y, and $type. I would like to > plot $x~$y and having different colors for the corresponding points, one > for each level of $type. Would someone know how to do that? Is it > possible to then gene

Re: [R] Highlighting different series with colors

2008-02-25 Thread Henrique Dallazuanna
One option is use lattice: require(lattice) xyplot(x~y, data=your.data, group=type, auto.key=T) On 25/02/2008, Valentin Bellassen <[EMAIL PROTECTED]> wrote: > Hello, > > I have a data frame with 3 vectors $x, $y, and $type. I would like to > plot $x~$y and having different colors for the corres

[R] Highlighting different series with colors

2008-02-25 Thread Valentin Bellassen
Hello, I have a data frame with 3 vectors $x, $y, and $type. I would like to plot $x~$y and having different colors for the corresponding points, one for each level of $type. Would someone know how to do that? Is it possible to then generate a legend automatically? Valentin __