Hi:

It's not a perfect solution, but an 'easy' way out is to recognize that some
symbols are open and some are filled. If you want fill, use a filled symbol
and then change the color.

p <- rep(16:18, 4)
x<-c(1:12)
y<-c(rpois(12,4))
grp<-c(rep(c(3,4), each=6))
z<-c(rep(c(1,2), each=6))
dd <- data.frame(x, y, grp, z, p)
xyplot(y ~ x, data = dd, cex = 1.2, pch = dd$p, col = c('black',
'blue')[dd$z])

HTH,
Dennis

On Thu, Feb 10, 2011 at 1:21 PM, John Poulsen <jpoulsen@whrc.org> wrote:

> Hello,
>
> I am trying to make a xyplot plot with points that are different symbols. I
> want to call the symbol type (pch) from a column in my dataframe.  Here is a
> simplified example.  In my real example I also have groups, which I have not
> included here.  This example doesn't change the symbols or colors.
>
> Any help you can provide would be appreciated.
>
> Thanks,
> John
>
> x<-c(1:12)
> y<-c(rpois(12,4))
> grp<-c(rep(c(3,4), each=6))
> z<-c(rep(c(1,2), each=6))
> p<-rep(1:3,4)
>
> xyplot(y~x|z, cex=1.2,
>       panel=function(x,y,...){
>         panel.xyplot(x,y,...)
>          pch=p
>          fill=list("black","blue")})
>        [[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.
>

	[[alternative HTML version deleted]]

