You can create three types of bivariate kernel density plots in Stata, one is a 2D heatmap, the second is a surface plot, and the third is a bar plot.
To create these graphs in Stata, you first need to download the command tddens from the SSC, which you do in Stata using the following command:
ssc install tddens



To generate all three of these graphs in Stata, use the following commands:
sysuse auto, clear
tddens price mpg, sgraph bgraph
The first graph is always generated by the tddens command, the second graph is generated using the sgraph option, and the third graph is generated using the bgraph option.