[R] lattice: problem with cex argument.
ernesto
ernesto at ipimar.pt
Fri Mar 31 14:03:05 CEST 2006
Hi,
I'm trying to plot a "bubbles" plot wich I do with the cex argument. The
problem is that it looks like it fails the conditioning and reuses the
first 100 elements of the cex vector. See the code
x <- rep(rep(1:10,10),2)
y <- rep(rep(c(1:10),rep(10,10)),2)
z <- rep(1:2,c(100,100))
w <- rpois(200,l=1)
xyplot(y~x|z, cex=w)
the plot has the same pattern in both sides but the data are different, see
> tapply(w,z,summary)
$"1"
Min. 1st Qu. Median Mean 3rd Qu. Max.
0.00 0.00 1.00 0.99 1.00 4.00
$"2"
Min. 1st Qu. Median Mean 3rd Qu. Max.
0.00 0.00 1.00 0.95 2.00 4.00
or the plots
par(mfrow=c(1,2))
tapply(w,z,hist)
and
xyplot(w~x|y*z)
Is this a feature or a bug ?
Regards
EJ
More information about the R-help
mailing list