[R] line colors in lattice.xyplot with png device.

Federico Calboli f.calboli at ucl.ac.uk
Fri Jul 18 14:13:26 CEST 2003


for the background try: 

# open a trellis device. If not open the next step will not work
trellis.device(device=windows) #x11 in linux

# set background to white. Only works on an open trellis device
background<-trellis.par.get("background")
background$col<-"white"
trellis.par.set("background",background)

# set the default line colour to black
plot.line<-trellis.par.get("plot.line")
plot.line$col<-"black"
trellis.par.set("plot.line",plot.line)

# set the default symbol colour to black
dot.symbol<-trellis.par.get("dot.symbol")
dot.symbol$col<-"black"
trellis.par.set("dot.symbol",dot.symbol)

# set strip background color
strip.background<-trellis.par.get("strip.background")
strip.background$col<-"white"
trellis.par.set("strip.background",strip.background)

should be self explanatory

try ?par to get na idea on how to get different colours for the line. the
lattice/trellis manual is avalable in pdf from bell labs

FC


=========================

Federico C.F. Calboli

Department of Biology
University College London
Room 327
Darwin Building
Gower Street
London
WClE 6BT

Tel: (+44) 020 7679 4395 
Fax (+44) 020 7679 7096
f.calboli at ucl.ac.uk




More information about the R-help mailing list