I have a 2d histogram created with stat_bin2d in the ggplot2 package. I\'d like to control both the number of breaks in the color gradient, as well
stat_bin2d
ggplot2
Me thinks you probably want the less talked about cousin of scale_colour_gradient2(), scale_fill_gradient2()
scale_colour_gradient2()
scale_fill_gradient2()
Using your data:
p + scale_fill_gradient2(breaks=c(1,2,3,4,5,6))
Also note the optional parameters low, mid, and high for additional controls.
low
mid
high