From deepayan at stat.wisc.edu  Wed May 14 00:50:17 2003
From: deepayan at stat.wisc.edu (deepayan@stat.wisc.edu)
Date: Tue May 13 23:50:34 2003
Subject: [Rd] bug in y limits in bwplot (PR#2865)
Message-ID: <200305132150.h4DLoH2b002292@pubhealth.ku.dk>


This turns out to be a long-standing bug (in all the lattice functions in 
fact, not only bwplot). Should be fixed in the next release. A workaround is 
to use xlim and ylim directly instead of limits in scale.

On Monday 28 April 2003 01:20, rmh@surfer.sbm.temple.edu wrote:

> ## bug in y limits in bwplot
>
> tmp <- data.frame(y=1:10, a=factor(rep(1:2,5)))
>
> ## x limits in bwplot works as expected
> bwplot(y ~ a, data=tmp, horizontal=F)  # works
>
> bwplot(y ~ a, data=tmp, horizontal=F,  # works
>        xlim=c(-1,5))
>
> bwplot(y ~ a, data=tmp, horizontal=F,  # works
>        scales=list(x=list(limits=c(-1,5))))
>
>
> ## problem with y limits in bwplot
> bwplot(a ~ y, data=tmp, horizontal=T)  # works
>
> bwplot(a ~ y, data=tmp, horizontal=T,  # works
>        ylim=c(-1,5))
>
> bwplot(a ~ y, data=tmp, horizontal=T,  # error message
>        scales=list(y=list(limits=c(-1,5))))
>
>
> ## transcript with error message
>
> > bwplot(a ~ y, data=tmp, horizontal=T,  # error message
>
> +        scales=list(y=list(limits=c(-1,5))))
> Error in print.trellis(structure(list(as.table = FALSE, aspect.fill = TRUE,
>  : Invalid value for labels
> In addition: Warning message:
> is.na() applied to non-(list or vector) in: is.na(x)


[Rd] bug in y limits in bwplot (PR#2865)
deepayan@stat.wisc.edu