Thanks much - very nice. I hadn't thought of that approach.
I dug around in the lattice source and found another way to do it so
for what it's worth, I'll post it - maybe it will be useful to
someone. Basically, I made a function from code found in
plot.trellis() that gets the grid layout
Basically you want to achieve an aspect ratio of 0.5 (say) when
specifying aspect = "fill". You can calculate the aspect ratio after a
lattice plot has been displayed:
currAspect <- function() {
trellis.focus("panel", 1, 1, highlight = FALSE)
sz <- current.panel.limits("mm")
trellis.un
I almost always supply my own aspect ratio when plotting using
lattice. When I plot these to pdf, I would like to specify pdf
dimensions that will result in minimal margins around the plot. In my
application, resorting to a pdf cropper after plotting is not an
option - I must do it in R.
3 matches
Mail list logo