[R] Trellis graphics and clipping

(Ted Harding) Ted.Harding at nessie.mcc.ac.uk
Sun Jul 29 14:40:47 CEST 2001


Hi again folks,

I seem to have got the trellis (lattice + grid) business
working basically OK, in that I can get my 5x5 array of
histograms laid out as they should be.

However, there is a behaviour I can't see my way round.

Even when displayed in the R Graphics Window, there is
some clipping (the extreme top, bottom, left and right
edges are not there, so that labels, and parts of numerical
scale markers all round, have been clipped off).

When I switch to the "postscript" device, with the comamnd
'postscript(filename,...)', the result is even more clipped,
in that parts of the histogram plots themselves get cut off,
including their titles as seen in the X11 display. On the
other hand (using gv's "position meter"), it seems that the
internal %%BoundingBox matches the dimensions and coordinates
of what SHOULD get displayed/printed, allowing plenty of
"white space" round the bit of the graphic that _does_ get
displayed, so that the whole thing could have been fitted in
anyway.

And if I go at it crudely, simply using 'dev.print()' to
bang out a har-copy, it is even more clipped again ...

I've tried playing with all the obvious (to me) parameters
which I can find, but it has not effect on this.

I've checked the PostScript file itself, and the parts that
are missing are not mentioned therein, so it's not a PostScript
"clippath" phenomenon: it's definitely R which is deciding not
to output them.

What's needed is some way of coordinating the dimensions of
the various levels of this process, so that the output to X11
is scaled so that the whole graphic can fit in, and the output
to postscript is also scaled so that it fits into whatever
size of graphic is nominated (not that this should be an
issue for EPS output anyway -- it would be quite sufficient
to output everything and then put a BoundingBox round the
lot, and never mind things like papersize and so forth).

So I'm bewildered. And, if anyone knows a way round it,
I'd be most obliged to hear!

With thanks,
Ted.

--------------------------------------------------------------------
E-Mail: (Ted Harding) <Ted.Harding at nessie.mcc.ac.uk>
Fax-to-email: +44 (0)870 167 1972
Date: 29-Jul-01                                       Time: 13:40:47
------------------------------ XFMail ------------------------------
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list