annotate graphics/colour/bipolarjoin.m @ 61:eff6bddf82e3 tip

Finally implemented perceptual brightness thing.
author samer
date Sun, 11 Oct 2015 10:20:42 +0100
parents 82075c94eed1
children
rev   line source
samer@47 1 function c=bipolarjoin(a,b)
samer@47 2 % BIPOLARJOIN - Create bipolar colormap ('black' in the middle) by joining two maps
samer@47 3 %
samer@47 4 % map=bipolarjoin(neg,pos) - return colourmap [flipud(neg); pos]
samer@47 5 % ie colormap neg is reversed. If no output argument specified, colormap is
samer@47 6 % installed in current figure.
samer@47 7 if size(a,1)~=size(b,1), error('Colormaps must be of same length'); end
samer@47 8
samer@47 9 out=[flipud(a); b];
samer@47 10 if nargout<1, colormap(out); else c=out; end;