> I was wondering if it is possible to create a 2d density plot in Gadfly.
It will produce counts rather than densities, so the scale will not be quite right, but you can get something along the lines of what you want using 2D histograms <http://dcjones.github.io/Gadfly.jl/geom_histogram2d.html> or hexbins <http://dcjones.github.io/Gadfly.jl/geom_hexbin.html>. You might consider using PGFPlots.jl <https://github.com/sisl/PGFPlots.jl> (though it requires pdf2svg and latex to be installed with the pgfplots package). You would use Histogram2 with density=true to get what you want. See cell 47 in the documentation <http://nbviewer.jupyter.org/github/sisl/PGFPlots.jl/blob/master/doc/PGFPlots.ipynb> .