[R] Adding points on top of lines in xyplot
David Afshartous
dafshartous at med.miami.edu
Tue Nov 20 20:14:57 CET 2007
All,
I'm trying to make a basic plot: data points superimposed upon the a line
connecting the points w/ a different color. Example below doesn't work as
the first xyplot call doesn't remain. Suggestions?
David
Hour = c(NA,1,2,3,4)
y = c(2,2,3,2,1.5)
xyplot(y ~ Hour, xlab = list("Hour", font=2, cex=2), ylab= list("U_x * V",
font=2, cex=2), type = 'l', scales = list( x= list(tick.number=5, cex=2,
limits=c(0,4.5)), y=list(cex=0)), lines=TRUE, lwd = 2 , add=TRUE )
xyplot(y ~ Hour, xlab= "", ylab="", pch= 16, col= "red", cex=3 , xlim =
c(0, 4.5), add=TRUE )
More information about the R-help
mailing list