[R] How do I change plot colors in bwplot

zzaward@fox.uq.net.au zzaward at fox.uq.net.au
Tue Sep 24 06:19:25 CEST 2002


The following short script, from the S-PLUS newsgroup I think, changes the
strip colour to whatever you specify. The default here is white.

> trellis.strip <- function (b = 0, s = 0)
{
    s.b <- trellis.par.get("strip.background")
    s.b$col <- rep(b, length(s.b$col))
    trellis.par.set("strip.background", s.b)
    s.s <- trellis.par.get("strip.shingle")
    s.s$col <- rep(s, length(s.s$col))
    trellis.par.set("strip.shingle", s.s)
}


Regards,


Andrew C. Ward

CAPE Centre
Department of Chemical Engineering
The University of Queensland
Brisbane Qld 4072 Australia
andreww at cheque.uq.edu.au

Original Message:
-----------------
From: kjetil halvorsen kjetilh at umsanet.edu.bo
Date: Mon, 23 Sep 2002 21:19:55 -0400
To: knussear at biodiversity.unr.edu, r-help at stat.math.ethz.ch
Subject: Re: [R] How do I change plot colors in bwplot


bwplot is a lattice function. Before you use it, try

trellis.device(color=FALSE)
 lset(theme=col.whitebg())

but this seems only to change the background to white, the other colors
are as before.

Kjetil Halvorsen

Ken Nussear wrote:
> 
> Hello,
> 
> I'm using bwplot to make a few plots. The plots are exactly what I need,
but are coming out with a grey background and turquoise boxes and whiskers.
I cannot figure out how to just get black and white to be the default. Can
anyone help me with this?
> 
> Thanks
> 
> Kenneth E. Nussear Phone 775 784-1703
> Ecology, Evolution and FAX 775 784-1369
> Conservation Biology/314 knussear at biodiversity.unr.edu
> Reno, Nevada 89557-0013 http://www.brrc.unr.edu/~knussear/
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._.
_._


--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list