Ok, I was looking for a function that helps me resize my regression line in xyplot. I tried panel.abline(reg = coef, size = 2) , but it does not work.
Listen to my code
Plot.col <- brewer.pal(8,"Set1")[8][cut(Std.Change, c(-2.5,2.5), label = FALSE)] Plot.ord <- rev(order(Std.Change)) coef <- coef(lm(Std.ModernC ~ Std.Change, data = Std.DataReg)) xyplot(Std.ModernC ~ Std.Change, data = Std.DataReg[Plot.ord, ], type = c("p", "g"), col = "blue",pch = 21, fill = Plot.col[Plot.ord], cex = 1.3,panel = function(...) { panel.xyplot(...) panel.abline(reg = coef, col = "blue")})
In ggplot, it is very easy to resize the regression line by simply setting geom_abline(size = 2)
I am still studying lattice and I don't know if there is a function for this or something else.
Any help is greatly appreciated.
source share