[R] Does anybody know how to control the appearance of the end of the line in lattice?
George Chen
glchen at stanford.edu
Sun Aug 8 21:49:53 CEST 2010
Hi All,
I am plotting vertical lines using xyplot in lattice and type="h".
It works well, but the problem is that the tops of the lines are convex and the bottoms are concave.
Is there a way to flatten the tops and bottoms?
Here's my code:
Source<-matrix(1:30,10,3)
colnames(Source)<-c("x","y1","y2")
Source<-data.frame(Source)
xyplot(y2+y1~x,
data=Source,
distribute.type=TRUE,
type=c("h","h"),
col=c("black","white"),
lwd=20)
graphics.off()
Thanks.
George Chen
More information about the R-help
mailing list