Skip to content

Instantly share code, notes, and snippets.

@mkuhn
Created March 10, 2011 08:23
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/863745 to your computer and use it in GitHub Desktop.
Save mkuhn/863745 to your computer and use it in GitHub Desktop.
pred <- ddply(data.frame(x=c(5:65)*0.01), .(x), function(t) data.frame(x = t$x, y = c(5:85)*0.01) )
pred$enrichment <- predict(sigmoid, pred)
max_pred <- max(pred$enrichment, d$enrichment)
p <- ggplot(pred,aes(x,y))+geom_tile(aes(fill=enrichment))+scale_fill_gradient(low = "white", high = "steelblue",limits=c(0,max_pred))
p <- p + xlab("x") + ylab("y")
p <- p + geom_point(data=d,aes(x=x, y=y, colour=enrichment),size=20) +scale_colour_gradient(low = "white", high = "steelblue",limits=c(0,max_pred))
print(p)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment