Current location - Trademark Inquiry Complete Network - Overdue credit card - How to draw two scatter charts together in R language?
How to draw two scatter charts together in R language?
For example, vd2 = c (- 16.3,-12.2, -8.2, -3.9, 0, 5.9, 9.7, 13.2, 18. 1).

vd 1=c(- 16.6,- 12.5,-8.8,-4.2,0,6,9.8, 15, 18.2)

y=c(- 16,- 12,-8,-4,0,4,8, 12, 16)

Drawing (y~vd 1)

Drawing (y~vd2, col="red ")

Then when needed (ggplot2)

VD = r bind(data . frame(v = VD 1,y=y,t=as.factor( 1)),data.frame(v=vd2,y=y,t=as.factor(0)))

ggplot(vd,aes(x=v,y=y)) + geom_point(aes(color=t))

You can download the next package.