view 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
line wrap: on
line source
function c=bipolarjoin(a,b)
% BIPOLARJOIN - Create bipolar colormap ('black' in the middle) by joining two maps
%
% map=bipolarjoin(neg,pos) - return colourmap [flipud(neg); pos]
% ie colormap neg is reversed. If no output argument specified, colormap is 
% installed in current figure.
if size(a,1)~=size(b,1), error('Colormaps must be of same length'); end

out=[flipud(a); b];
if nargout<1, colormap(out); else c=out; end;