draw lines on overlaid scatter plots in R -


enter image description herei want visualize embedding r^2 r^2. have overlaid scatter plots of original data , transformed data. want join dots stars corresponding same color line can see how each point gets transformed. idea how in r. reproducible example of overlaid scatter plot given below.

set.seed(18)  m<-cbind(a=runif(10),b=runif(10))  n<-cbind(d=rnorm(10),e=rnorm(10)) plot(n[,1],n[,2],col=rainbow(10),pch=20,xlab="x",ylab="y") points(m[,1],m[,2],col=rainbow(10), pch=8) 

one way segments

segments(n[,1], n[,2], m[,1], m[,2], col = rainbow(10)) 

enter image description here


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -