h = scatterhist(log(rand(1,100)),log(rand(1,100)),'Marker','o','Direction','out');
xHist = findobj(h(2),'Type','histogram');
yHist = findobj(h(3),'Type','histogram');
h(2).YLim(2) = h(2).YLim(2).*1.2;
h(3).YLim(2) = h(3).YLim(2).*1.2;
xBinCenter = xHist.BinEdges(2:end)-xHist.BinWidth/2;
xHistLabels = compose('%.0f%%',xHist.Values.*100);
text(h(2),xBinCenter, xHist.Values.*1.01, xHistLabels,...
'HorizontalAlignment', 'Right', 'VerticalAlignment', 'middle', ...
'FontSize', 8, 'Rotation', 90)
yBinCenter = yHist.BinEdges(2:end)-yHist.BinWidth/2;
yHistLabels = compose('%.0f%%',yHist.Values.*100);
text(h(3),yBinCenter, yHist.Values*1.01, yHistLabels,...
'HorizontalAlignment', 'Right', 'VerticalAlignment', 'Middle', ...
'FontSize', 8)
Best Answer