Displaying 1 result from an estimated 1 matches for "axiss".
Did you mean:
axis
2012 Apr 18
3
how to plot separate lm ablines on the same xyplot by group
Hi,
I am trying to use xyplot to plot the relationship between size and day
(y~x) by a food factor that has two levels, low and high. I have 3 reps per
factor/day. I want the plots from each food treatment on the same axiss,
so I used this code:
xyplot(Size ~ Day, groups = Food, data = louis.data.means,col=1,
pch=c(1,17),
panel=function(x,y,groups,...){
panel.superpose(x,y,groups,...)
tmp.lm<-lm(y~x)
panel.abline(tmp.lm)
panel.text(2, 250, label=format(tmp.lm$coefficients[2], digits=4), pos=4)
}
)
This produces a...