The plotting works perfectly if not for one thing: when plotting data using a grouping variable the marginal histograms look all normalized to their own maxima.
This makes it impossible to compare the relative abundance of elements in different groups, as it just gives an idea of how the data are distributed within each of them.
I would like instead to conserve the former information, thus allowing group comparisons.
It should be possible to access the handles of the marginal histograms in this way.
If "s" is the general handle: s = scatterhist(x,y,'Group',grouping_variable,'Kernel','on').
s(1) is the handle for the scatter plot
s(2) the bottom marginal hisogram (referred to the X axis) and
s(3) the one for the vertical histogram (referred to the Y axis)
I also did not manage to change the bin size of the two.
Perhaps all this is very trivial…
thanks for your help
Best Answer