[R] wrong lines in auto.key xyplot

arysar arysar at gmail.com
Mon Feb 21 18:17:10 CET 2011


Hi all,

I'm having a problem with the auto.key function in xyplot.
This is simplified version of my data:

q	Weeks	Dq
-10	1	2.1122
1	1	1.9904
10	1	1.739
-10	3	2.5942
1	3	1.9714
10	3	1.8745
-10	5	2.5743
1	5	1.9523
10	5	1.7976
-10	7	2.4418
1	7	1.9741
10	7	1.8868
-10	9	2.3255
1	9	1.983
10	9	1.9242
-10	11	2.303
1	11	1.9847
10	11	1.9342


So I changed the symbols an lines styles and generated my graphic

trellis.par.set(superpose.symbol=list(pch=c(0,1,2,3,4,5,6,8,15,16)))
trellis.par.set(superpose.symbol=list(col=c(rep("black",11))))
trellis.par.set(superpose.symbol=list(cex=c(rep(0.6,11))))
trellis.par.set(superpose.line=list(col=c(rep("black",11))))
trellis.par.set(superpose.line=list(lty=c(1,1,1,2,2,2,2,3,3,3,3)))

xyplot(Dq~q , data =zq, groups=Weeks, type="o",
auto.key=list(x=.7,y=.9,title="Weeks",cex.title=1, points=TRUE,
lines=TRUE))

the graphic showed perfectly, but in the
legend the lines have any other style. What I am doing wrong?

Any help would be greatly appreciated.

Leonardo A. Saravia
Instituto de Ciencias
Universidad Nacional de General Sarmiento



More information about the R-help mailing list