I would appreciate any answer to the following two problems I am having with the Lattice package. First, in most instances of using Lattice, the produced graphs have some clipping, usually at the borders of the encompassing rectangles. An example of this is here: http://cs.uwm.edu/~vu/lattice.pdf where the clipping occurs in the first half of the X axis. Second, when printing to a postscript file, for example, using the command trellis.device(postscript, file = "test.ps", color = TRUE) to initialize the output file and then the command dotplot(y ~ x | z, ...) to draw the graph, the postscript file test.ps still has zero size. If at this point I quit R, then test.ps will contain the output graphics. Is there a way to "flush" the trellis device without exiting R? Thank you very much in advance. Vu Ha, PhD. Information and Decision Technology Honeywell Aerospace 3660 Technology Dr. Minneapolis, MN 55418 612-951-7114
Problem with clipping in Lattice, and closing a postscript device
2 messages · VU HA, Deepayan Sarkar
On Tuesday 26 April 2005 15:27, VU HA wrote:
I would appreciate any answer to the following two problems I am having with the Lattice package. First, in most instances of using Lattice, the produced graphs have some clipping, usually at the borders of the encompassing rectangles. An example of this is here: http://cs.uwm.edu/~vu/lattice.pdf where the clipping occurs in the first half of the X axis.
I've never seen this type of problem before. I suspect using dev.off() as described below would solve this too.
Second, when printing to a postscript file, for example, using the command trellis.device(postscript, file = "test.ps", color = TRUE) to initialize the output file and then the command dotplot(y ~ x | z, ...) to draw the graph, the postscript file test.ps still has zero size. If at this point I quit R, then test.ps will contain the output graphics. Is there a way to "flush" the trellis device without exiting R?
You have to use dev.off() to properly finish creating a graphics file (this is true for R graphics in general, not just lattice). Deepayan