[R] problem with xyplot
Carlisle Thacker
Carlisle.Thacker at noaa.gov
Fri Nov 26 18:58:23 CET 2004
Dear Rlisters,
When trying to indicate which data belong to which of 7 groups, the
following plot shows only 5 groups:
ss <- trellis.par.get("superpose.symbol")
ss$col <- c("red","blue","green","yellow","orange","magenta","cyan")
ss$pch <- format(1:7)
ss$cex <- 1.2
ss <- trellis.par.get("background")
ss$col <- "white"
trellis.par.set("background",ss)
xyplot(t~s,data=P0,
subset = p==1500 & whichLonP==2 & whichLatP==3 & t<6 & id>100000000,
groups = id%/%1000)
# don't see groups 6 and 7 ?????????????
But groups can be put into separate panels:
xyplot(t~s|factor(id%/%1000),data=P0,as.table=TRUE,
subset = p==1500 & whichLonP==2 & whichLatP==3 & t<6 & id>100000000)
And using a smaller dataframe helps:
temp <- P0[P0$p==1500 & whichLonP==2 & whichLatP==3 & P0$t<6,]
xyplot(t~s,data=temp,
subset = id>100000000,
groups = id%/%1000)
# get different labels but all groups
Also, for other plots involving large dataframes, specifying groups made
the plotting very slow.
Is there a bug, or am I screwing up?
Thanks,
Carlisle
More information about the R-help
mailing list