Message-ID: <eb555e660904220857i4bfe0436m2318593f6b145c84@mail.gmail.com>
Date: 2009-04-22T15:57:49Z
From: Deepayan Sarkar
Subject: RES: How to force axis to have the same range
In-Reply-To: <49EF0CDA.7060308@cognigencorp.com>
On 4/22/09, Sebastien Bihorel <Sebastien.Bihorel at cognigencorp.com> wrote:
> Thanks to all the people who answer my question. It is know clear to know
> how to produce a square shape graph... but I guess there is no easy way to
> force the x and the y axis to have the same limits.
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