# NOT RUN {
if(requireNamespace("hexbin", quietly = TRUE)) {
set.seed(634267)
dframe = data.frame(x = rnorm(1000), y = rnorm(1000))
print(HexBinPlot(dframe, "x", "y", "Example hexbin"))
diamonds = ggplot2::diamonds
print(HexBinPlot(diamonds, "carat", "price", "Diamonds example"))
# change the colorscale
print(HexBinPlot(diamonds, "carat", "price", "Diamonds example",
lightcolor="#fed98e",
darkcolor="#993404"))
}
# }
Run the code above in your browser using DataLab