Dear lettice gurus, the code below works just fine to produce a dotplot. However, I am not successful changing the color of the lines in the legend (auto.key). If I add col=..., it only changes the color of the letters in the legend, but not the color of the lines. Really appreciate any advice on that! Dimitri
library(lattice) d=data.frame(xx=c(2.2,2.1,3.3),yy=c(0.1,0.2,0.3),zz=c(2.5,2.0,1.8)) d[[2]]<-as.factor(d[[2]]) dotplot(c(d[[1]],d[[3]])~rep(d[[2]],2),groups=rep(c("Group 1","Group 2"),each=nrow(d)),main=list("Chart Title",cex=1), xlab=list("Title for X",cex=.9,font=2), ylab=list("Title for Y",cex=.9,font=2), auto.key = list(space = "top", points = T, lines = T,cex=.9), panel = function(y,x,...){ panel.grid(h = -1, v = -1, col = "gray", lty ="dotted", ltx="dotted") panel.superpose(x,y,..., type="b",col.line=c("blue","red"),pch=20,cex=1.3, col=c("blue","red"),bg=c("blue","red"),lwd=2) ltext(x, y, labels=round(y,3), cex=.8,col="black",font=2,adj=c(-0.2,1)) # adds labels to those circles # pos=2, panel.abline(h=0) } ) -- Dimitri Liakhovitski MarketTools, Inc. dimitri.liakhovit...@markettools.com ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.