Re: [R] Re : Adding mean line to a lattice density plot

2012-03-08 Thread K. Elo
Hi, thank you, Pascal, for your quick reply. Unfortunately your suggestion is not working. Please have a look on the attachment, I have added manually the mean lines I am trying to plot. The problem with 'abilne' seems to be that the argument 'v' is relative to the graph area, not the x-axis

[R] Re : Adding mean line to a lattice density plot

2012-03-07 Thread Pascal Oettli
Hi Kimmo, You can try to use the "layer" function from "latticeExtra" library: densityplot(~PV1CIV, groups=SGENDER, data=ISGFINC2,   lwd=2, col=1, lty=c(1,2), pch=c("+","o"),   key=list(text=list(lab=levels(ISGFINC2$SGENDER), col=1),   space="bottom", columns=2, border=T, lines=T, lwd=2,   lty=c(