In this example of a hexbin plot, the legend on the right has 10 levels/classes/breaks. Does anyone know how to change the number of levels? Say I want to change it to 5 or something.
library(hexbin)
x=rnorm(1000, mean = 50, sd = 1)
y=rnorm(1000, mean = 30, sd = 0.5)
df <- data.frame(x,y)
#plot(df)
hb <- hexbin(x=df$x, df$y)
#hb <- hexbin(x=df$x, df$y,xbins=30)
#plot(hb)
gplot.hexbin(hb)