Skip to content
Prev 177948 / 398502 Next

RES: How to force axis to have the same range

On 4/22/09, Sebastien Bihorel <Sebastien.Bihorel at cognigencorp.com> wrote:
If you mean the general case where you don't want to specify xlim and
ylim explicitly, then in lattice you can use

xyplot(...
       prepanel = function(x, y, ...) {
           rng <- range(x, y, finite = TRUE)
           list(xlim = rng, ylim = rng)
       })

-Deepayan