Thanks for giving me an answer. Let me rephrase the question. I recooked the code and arrange the subplots as I want. Upper subplot contains rotated histogram with log occurences. Lower subplot contains scatter plot. Yaxes of subplots are linked. Why doesn't work the data brushing?
a = randn(1000,1);
b = 200*randn(1000,1)+1400;
bins = linspace(min(b),max(b),10);
[occur,binsout] = hist(b,bins);
hS1 = subplot(2,1,1);
hB = barh(binsout,occur,'YDataSource','occur');
set(hB,'basevalue',1); %avoids errors when swiching to logscale
ylabel('b binned'); xlabel('log occurrence b');
I'm not shure what to put as datasource for the histogram. Is it the variable OCCUR or is it required to recalculate it by HIST(B,BINS). How can get the same functionality as the initial question but in the layout (see picture) as I want.