Mercurial > hg > ishara
view histogram/plothist_bars.m @ 61:eff6bddf82e3 tip
Finally implemented perceptual brightness thing.
author | samer |
---|---|
date | Sun, 11 Oct 2015 10:20:42 +0100 |
parents | ce9021da6ce2 |
children |
line wrap: on
line source
function h=plothist_bars(Map,Counts,varargin) % plothist_bars - Plot histogram using bars. % % plothist_bars :: % dmap(N) ~'the bin map', % [[N]] ~'the bin counts' % -> handle. % % The width of the bars matches the width of the discretisation bins. % The *area* of the bars (not the height) is proportional to bin counts. % Any extra arguments are passed to FILL. if isvector(Counts), Counts=Counts(:)'; end x=bins(Map); y=Counts./diff(x); h=fill([x;flipud(x)],[zeros(2,size(y,2));y;y],1, ... 'EdgeColor',get(gca,'XColor'),varargin{:}); caxis([0,2]);