Mario Alfonso Morales Rivera
2005-Jul-01 20:33 UTC
[R] Setting lattice boxplot's lines to black
Hi R users.
I'm using the lattice library and I need a print version for my graphics.
How Set I my boxplot's lines to black ????
tpl<-trellis.par.get("plot.line")
tpl$col<-"black"
trellis.par.set("plot.line", tpl)
Don't work. Boxplot's lines aren't black.
Thanks a lot.
This is my script.
library(lattice)
# I set background's color to white
tbg<-trellis.par.get("background")
tbg$col<-"white"
trellis.par.set("background", tbg)
# Set strip background's color to white
tsbg<-trellis.par.get("strip.background")
tsbg$col<-"white"
trellis.par.set("strip.background", tsbg)
# I set symbol's color to black
tps<-trellis.par.get("plot.symbol")
tps$col<-"black"
trellis.par.set("plot.symbol", tps)
# Set line's color to black
tpl<-trellis.par.get("plot.line")
tpl$col<-"black"
trellis.par.set("plot.line", tpl)
print(bwplot(Sepal.Length~Species ,data=iris))
# This work whit xyplot but don't work whit bwplot, the boxplot's
# lines aren't black.
How Set I my boxplot's lines to black ????
Thanks a lot.
--
Mario Alfonso Morales Rivera
Profesor Auxiliar.
Departamento de Matem??ticas y Estadistica.
Universidad de C??doba.
Colombia
On 7/1/05, Mario Alfonso Morales Rivera <malfonso at sinu.unicordoba.edu.co> wrote:> Hi R users. > > I'm using the lattice library and I need a print version for my graphics. > > How Set I my boxplot's lines to black ????(As I said in a private reply,) you seem to want a black and white plot, so use trellis.device(color = FALSE) to initialize the device. Deepayan