Think that we need to plot many pairs, e.g. comparing A vs. G. What we can do in R:
#generate two correlated variables
a=rnorm(1000000)
b=a+rnorm(a)
plot is rather horrible
plot(a,b)
We can draw a map with level curves
require(MASS)
contour(kde2d(a,b))
But I find that hexagonal binning is even nicer (and very fast !!)
require(hexbin)
tt=hexbin(a,b)
plot(tt)
Finally, we have persp:
persp(kde2d(a,b))
No comments:
Post a Comment