[R] Setting lattice boxplot's lines to black

Mario Alfonso Morales Rivera malfonso at sinu.unicordoba.edu.co
Fri Jul 1 22:33:12 CEST 2005


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




More information about the R-help mailing list