The scatterhist() function returns a vector of axis handles to the scatter plot, the x box plots, and the y box plots, respectively. Here's how to turn off the axes for the marginal box plots.
h = scatterhist(...
h(2).Visible = 'off';
h(3).Visible = 'off';
You can also control the box property this way.