Skip to content
Prev 154706 / 398503 Next

npc to native coordinates for xyplot

On 9/1/08, Jason Pare <jay.pare at gmail.com> wrote:
I'm not sure why you are using baseViewports(); xyplot() uses grid,
not base graphics.

lattice provides means to access (most of) the viewports it creates.
You could do:

xyplot(y ~ x, groups=pt, data=dt)
trellis.focus(highlight=FALSE)
grid.circle(x=unit(-6,"native"), y=unit(-8,"native"), r=1)
trellis.unfocus()

There are other ways to do this too.

-Deepayan