Skip to content

Instantly share code, notes, and snippets.

@wulingyun
Created June 19, 2016 12:46
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 wulingyun/785bb3e96bd817fbafe053c577b16573 to your computer and use it in GitHub Desktop.
Save wulingyun/785bb3e96bd817fbafe053c577b16573 to your computer and use it in GitHub Desktop.
Color function for green-red heatmap
updown_colors <- function(n = 50, down.col = 1/3, up.col=1, saturation = 1)
{
c(hsv(down.col, saturation, seq(1,0,length=n)), hsv(up.col, saturation, seq(0,1,length=n)))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment