Paul Lasky wrote:
My Splus 6.1 (running on XP) produces a sickly turquoise colored box
plot when I call the trellis function bwplot. How do I change the color
from the awful turquoise ? Adding a "col" parameter [e.g. bwplot(
Capitaliztion ~ MoRet, data= moret, col = 7) ] doesn't do the trick;
it simply changes the color of the central dot in the box to a nice
yellow while leaving the turquoise box and whiskers unchanged.
In fact on all trellis plots the graph line is plotted in this awful
color. So how do I change the default ?
You'll need to change the trellis settings. See ?trellis.par.set:
br <- trellis.par.get("box.rectangle")
br$col <- 7
trellis.par.set("box.rectangle", br)
bu$col <- 7
trellis.par.set("box.umbrella", bu)
x <- data.frame(y = rnorm(20), z = rep(1:2, each =10))
bwplot(z ~ y, x)
Sometimes I find it easier to just set up a different colour scheme
before calling trellis at all:
trellis.device(graphsheet, color.table =
"0,0,0|0,0,255|0,255,0|255,0,0|255,255,255")
bwplot(z ~ y, x)
which maps col = 2 to "blue" (plus gets rid of that awful gray
background). See ?graphsheet for other options.
Regards,
Sundar
|