Skip to content

Instantly share code, notes, and snippets.

@mkuhn
Created March 9, 2011 17:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mkuhn/862551 to your computer and use it in GitHub Desktop.
Save mkuhn/862551 to your computer and use it in GitHub Desktop.
Comparing two-dimensional distributions using ggplot2
p <- ggplot(d,aes(x+0.05,y+0.05))+geom_tile(aes(fill=enrichment)) + scale_fill_gradient(low="white", high="steelblue", limits=c(0,120))
p <- p + xlab("x") + ylab("y")
p <- p + geom_point(aes(x=x+0.05, y=y+0.05, colour=pred),size=20) + scale_colour_gradient(low="white", high="steelblue", limits=c(0,120))
print(p)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment