Introduction Lately I was trying to put together some 2D histograms in R and found that there are many ways to do it, with directions on how to do so scattered across the internet in blogs, forums and of course, Stackoverflow.As such I thought I'd give each a go and also put all of them together here for easy reference while also highlighting their difference.For those not "in the know" a 2D histogram is an extensions of the regular old histogram, showing the distribution of values in a data set across the range of two quantitative variables. It can be considered a special case of the heat map, where the intensity values are just the count of observations in the data set within a particular area of the 2D space (bucket or bin).So, quickly, here are 5 ways to make 2D histograms in R, plus one additional figure which is pretty neat.First and foremost I get the palette looking all pretty using RColorBrewer, and then chuck some normally distributed data into a data frame (because I'm lazy). Also one scatterplot to justify the use of histograms.# Color housekeepinglibrary(RColorBrewer)rf