[R] xyplot gets overplotted by plot

Henric Nilsson henric.nilsson at statisticon.se
Thu Oct 14 19:25:40 CEST 2004


At 17:09 2004-10-14 +0100, Prof Brian Ripley wrote:

>You can't expect base graphics to know that you
>have used a grid plot (via lattice) after the last base graphics plot and
>did not intend to write on top of the latter.  Base graphics has been told
>to write on the existing page of the device, in the upper right figure
>region of an already divided device region.  So it does.

OK. I got fooled by that it seems to 'work' if we repeatedly just switch 
between xyplot and plot, i.e. without altering the par setting. But is that 
just due to everything on the device getting overwritten? I assumed that 
every call to plot erased the device before plotting.

>Why do you want to mix base and lattice graphics on the same device?

Convenience (if you define mixing as being able to direct all output from 
both graphic systems to a single window without risking one getting 
overlayed by the other).

>Think of it as a bonus that it works at all (it has not always, and base
>and Trellis interwork less well in S-PLUS).

I think of whole of R as a bonus. Thanks for your reply!

Henric




More information about the R-help mailing list