Skip to content
Prev 12644 / 398502 Next

Trellis graphics and clipping

The problem lies (if I get you correctly) in the fact
that Lattice graphics devices need to be initialized
differently from usual R graphics devices. This has to
do with special requirements of the underlying grid
package, and also some standard parameter settings
associated with each device.

Upshot: you need to use

trellis.device(postscript, file = "filename.ps")

instead of 

postscript("filename.ps")

What this does (with regard to clipping) is that it
calls a grid function grid.start(). You can get almost

the same effect if you do

postscript(filename)
grid.start()

but trellis.device is the preferred way. The same goes
for the x11() device.

I would encourage you to read the ?Lattice help page
to familiarise yourself with this sort of
peculiarities.

Note: Currently, usual R graphics and lattice/grid
graphics don't mix, that is, you have to enclose any
calls to grid graphics functions (which includes all
lattice graphics functions) within calls to
grid.start() and grid.stop(). Hopefully, this will
change somewhat in the next release of lattice.
--- Ted.Harding at nessie.mcc.ac.uk wrote:
--------------------------------------------------------------------
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._