scatterhist matlab equivalent


is there a way to make a 2d scatter plot that includes (outside the axes) histograms of the marginals of the two variables? like the matlab function ‘scatterhist’. see this for an example:

ideally i’d like the histograms outside the scatter plot to also have axes so that the height of each histogram bar will be interpretable.

thank you