Re: [R] adding device size-independent y=0 line to a lattice plot

2008-03-31 Thread Levi Waldron
On Mon, Mar 31, 2008 at 4:04 PM, Deepayan Sarkar <[EMAIL PROTECTED]> wrote: > > The obvious thing to try would be > > dotplot(y~x|fac, > panel = function(...) { > panel.abline(h = 0) > panel.dotplot(...) > }) > > Does this not work? > > -Deepayan > Yes t

Re: [R] adding device size-independent y=0 line to a lattice plot

2008-03-31 Thread Deepayan Sarkar
On 3/31/08, Levi Waldron <[EMAIL PROTECTED]> wrote: > Using the following lattice plot as an example, I would like to add > horizontal lines where y=0: > > library(lattice) > library(grid) > fac <- gl(4,12) > x <- letters[rep(1:3,16)] > y <- runif(48,min=0.0) > dotplot(y~x|fac) > > I've tri

[R] adding device size-independent y=0 line to a lattice plot

2008-03-31 Thread Levi Waldron
Using the following lattice plot as an example, I would like to add horizontal lines where y=0: library(lattice) library(grid) fac <- gl(4,12) x <- letters[rep(1:3,16)] y <- runif(48,min=0.0) dotplot(y~x|fac) I've tried it with grid.lines using npc and native units, which works fine unless I chan