I am not 100% sure if your data is in the matrix and you need a graph like a heat map. Or if it is in some other form and you want the scatter chart to be similar to the ones you are referencing. I just assumed that your data is described and you want to get a heat map. I assume this is something like:
x=abs(rnorm(100*100,50,25)) x=matrix(x,nrow=100)
So, I would modify the data so that it looks like xy coordinates with:
require(reshape2) require(ggplot2) x1=melt(x) names(x1)=c("x","y","color")
Then I would make my circumcision a factor:
x1$color=factor(x1$color>50) levels(x1$color)=c("lessthan50","more than 50")
Then call ggplot with:
qplot(x, y, fill=color, data=x1,geom='tile')

source share