search for: symbolvec

Displaying 1 result from an estimated 1 matches for "symbolvec".

Did you mean: symbolic
2007 Dec 25
1
both lines and plot characters in a lattice plot key
...from light to dark gray (instead of a single color), matching the colors in my specified variable "colors" if possible, i.e. a single line segment starting from light gray and ending with a dark gray. Thanks very much in advance! Jan library(lattice) x=c(1,2,3,4,5) y=c(5,4,3,2,1) symbolvec=c(3,3,3,1,3) colorseq=seq(0.25,0.88,length=5) colors=gray(colorseq) colorvec=colors xyplot(y~x, panel=function(...){ panel.xyplot(...,type="n") lpoints(x,y,pch=symbolvec,col=colorvec) }, key=list(x=0.2,y=0.2,lines=list(lty=c(0,0,1)),points=list(pch=c (1,3,26)),text=list(c("key...