From: May on 23 Jun 2010 11:37 I was wondering how you can make a custom colormap. I want a colormap that is a gradient of various green shades and a colormap that is a gradient of various red shades. Any help is appreciated, thank you.
From: Walter Roberson on 23 Jun 2010 11:49 May wrote: > I was wondering how you can make a custom colormap. > > I want a colormap that is a gradient of various green shades and a > colormap that is a gradient of various red shades. A colormap is just a double precision array of colors, N x 3 (RGB), each component in the range 0 to 1.0 . Fill in the array any way you want. For example for one with 72 green entries: M = 72; G = fliplr(linspace(0,1,M)) .'; myGmap = horzcat(zeros(size(G)), G, zeros(size(G)));
From: Steven Lord on 23 Jun 2010 12:39 "Walter Roberson" <roberson(a)hushmail.com> wrote in message news:r2qUn.111151$304.28291(a)newsfe12.iad... > May wrote: >> I was wondering how you can make a custom colormap. >> >> I want a colormap that is a gradient of various green shades and a >> colormap that is a gradient of various red shades. > > A colormap is just a double precision array of colors, N x 3 (RGB), each > component in the range 0 to 1.0 . Fill in the array any way you want. > > For example for one with 72 green entries: > > M = 72; > G = fliplr(linspace(0,1,M)) .'; > myGmap = horzcat(zeros(size(G)), G, zeros(size(G))); To extend what Walter said, this GUI may be of interest to you: http://www.mathworks.com/access/helpdesk/help/techdoc/ref/colormapeditor.html -- Steve Lord slord(a)mathworks.com comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ To contact Technical Support use the Contact Us link on http://www.mathworks.com
From: Doug Hull on 23 Jun 2010 14:59 http://www.mathworks.com/matlabcentral/fileexchange/17552-makecolormap This makes good colormaps also.
|
Pages: 1 Prev: Gibson Bruck implementation Next: Zero mean Circularly Symmetric Gaussian |