Skip to content

Instantly share code, notes, and snippets.

@Ram-N
Last active December 15, 2015 09:49
Show Gist options
  • Save Ram-N/5240937 to your computer and use it in GitHub Desktop.
Save Ram-N/5240937 to your computer and use it in GitHub Desktop.
#set up a coloring scheme using colorRampPalette
red=rgb(1,0,0); green=rgb(0,1,0); blue=rgb(0,0,1); white=rgb(1,1,1)
RtoWrange<-colorRampPalette(c(red, white ) )
WtoGrange<-colorRampPalette(c(white, green) )
p <- p + scale_fill_gradient2(low=RtoWrange(100), mid=WtoGrange(100), high="gray")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment