Code covered by the BSD License  

Highlights from
SC - powerful image rendering

image thumbnail

SC - powerful image rendering

by

 

04 Sep 2007 (Updated )

Useful tool for rendering and outputting information rich images

copper2(varargin)
%COPPER2  Black-copper-white colormap
%
% Examples:
%   map = copper2;
%   map = copper2(len);
%   B = copper2(A);
%   B = copper2(A, lims);
%
% A variation of MATLAB's copper colormap, which continues on to white.
% This colormap converts linearly to grayscale when printed in black &
% white.
%
% The function can additionally be used to convert a real-valued array into
% a truecolor array using the colormap.
%
% IN:
%   len - Scalar length of the output colormap. If len == Inf the concise
%         table is returned. Default: len = size(get(gcf, 'Colormap'), 1);
%   A - Non-scalar numeric array of real values to be converted into
%       truecolor.
%   lims - 1x2 array of saturation limits to be used on A. Default:
%          [min(A(:)) max(A(:))].
%
% OUT:
%   map - (len)x3 colormap table.
%   B - size(A)x3 truecolor array.

% Copyright: Oliver Woodford, 2009

function map = copper2(varargin)
map = [0 0 0; 0.2651 0.2426 0.2485; 0.666 0.4399 0.3738; 0.8118 0.7590 0.5417; 1 1 1];
map = colormap_helper(map, varargin{:});

Contact us