hexbin()
and smoothScatter()
plot(x, y, main="Customized scatter plot", xlim=c(50, 150), ylim=c(10, 50),
xlab="x axis", ylab="y axis", pch=16, col="darkgray")
plot(y, main="Univeriate scatter plot", ylim=c(10, 50),
xlab="Index", ylab="y axis", pch=4, lwd=2, col="blue")
Useful if one variable can take on only a few values, and one plot symbol represents many observations.
plot()
vec <- seq(from=-2*pi, to=2*pi, length.out=50)
mat <- cbind(2*sin(vec), sin(vec-(pi/4)), 0.5*sin(vec-(pi/2)))
matplot(vec, mat, type="b", xlab=NA, ylab=NA, pch=1:3, main="Sine-curves")
R markdown - markdown - R code - all posts