Skip to content
Prev 32947 / 398503 Next

box colours in lattice (was RE: [R] Strip location and grid colourin Lattice)

Despite my assertion that I had checked all the lattice theme components, I
was in error. Having made the appropriate changes in print.trellis and
succeded in what I wanted to do, I noticed obvious trellis.par.get calls and
followed them up. In the end what I required did not take much at all. This
amended xyplot example shows roughly what I was trying to get to.

require(lattice)
SetColGrey <- function(x=NULL)
{
lset(list(background = list(col = "transparent"),
add.text=list(col="grey50",cex=1.3),
axis.line=list(col="grey95"),
regions = list(col = c("navy","steelblue2")),
strip.shingle = list(col = c("grey75")),
strip.background = list(col = c("white"))))
}

SetColGrey()
data(barley)
     barchart(yield ~ variety | site, data = barley,
              groups = year, layout = c(1,6),
              ylab = list("Barley Yield (bushels/acre)",col="grey"),
              scales = list(col="grey25",x = list(abbreviate = TRUE,
                            minlength = 5)),
	        between=list(y=1.5))

Thank you everyone for your help, it has been very much appreciated.

-----Original Message-----
From: r-help-bounces at stat.math.ethz.ch
[mailto:r-help-bounces at stat.math.ethz.ch]On Behalf Of Prof Brian Ripley
Sent: Thursday, 5 June 2003 4:20
To: Mulholland, Tom
Cc: (r-help at stat.math.ethz.ch)
Subject: box colours in lattice (was RE: [R] Strip location and grid
colourin Lattice)


If you mean the rectangular boxes surrounding the panels and strips, they
are drawn by grid.rect() and not under the control of lattice.

If so, it is *not* a grid but a series of boxes, and they don't always
align perfectly, as example(xyplot) shows on my screen (and if you
had some space between the plots this would be clearer to you).

You could alter the grid.text calls in print.trellis to change the colour
....
On Thu, 5 Jun 2003, Mulholland, Tom wrote:

            
...(that's
trellis?
from
this.
--
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
R-help at stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help