Hello, I would like to get a lattice plot of 8 panels (unique(df$fact)=8) with 2 graphs (df$y1 and df$y2 as a function of df$x) and 1 red point at (500, ymax) per panel.
The script below is quite ok but I'm not able to define two different colors for the two graphs. If you have an idea how to use the "col" function in order to attribute the colors, it will be very kind of you to share it with a newbie. Have a nice week-end, Ptit Bleu. x11(15,12) xyplot(df$y1 + df$y1/df$coeff ~ df$x | df$fact, panel = function(x, y) { panel.grid(h=-1, v=-1, col="gray") panel.xyplot(x, y, type="p", pch=20) panel.points(500, ymax[panel.number()], col="red", pch=20, cex=1.6) }, xlab="X", ylab="Y") -- View this message in context: http://n4.nabble.com/lattice-2-graphs-per-panel-with-2-differents-colours-tp961037p961037.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.