Sunday, June 21, 2009

MATLAB: Some useful colormaps

Using methods described in an earlier blog entry I have created various color maps over the years to display data. Some of my favorites are:

1. BURNT

>>   nodes = [
      5 5 5;
      160 36 16;
      178 73 23;
      255 230 0;
      ];


>> index = [1 16 32 64];

MATLAB_07

2. PURPLE HAZE

>>   nodes = [
      10 0 80;
      152 58 151;
      195 145 194;
      218 175 162;
      222 185 222;
      252 220 252;
      ];


>> index = [1 4 13 30 52 64];

MATLAB_08

MATLAB_003B copy

3. RAINBOW

>> nodes = [
      48 0 155;
      0 0 131;
      0 155 254;
      0 188 0;
      254 246 0;
      254 98 48;
      221 0 0
      ];


>> index = [1 12 22 33 43 54 64];

MATLAB_09

MATLAB_003C copy

4. PRIMARY COLORS

>> nodes = [
      0 51 153;
      0 51 153;
      0 153 255;
      0 153 255;
      153 204 255;
      153 204 255;
      0 102 0;
      0 102 0;
      102 204 51;
      102 204 51;
      153 255 102;
      153 255 102;
      255 255 0;
      255 255 0;
      255 153 51;
      255 153 51;
      255 51 0;
      255 51 0;
      ];
 

>> index = [1 7 8 14 15 21 22 28 29 35 36 42 43 49 50 56 57 64];

 

MATLAB primaryColors

5. RED2BROWN

>> nodes = [
      153 102 0;
      204 153 0;
      255 204 0;
      255 255 0;
      255 204 102;
      255 153 51;
      255 51 0;
      153 0 0;
      ];
 

>> index = [1    10    19    28    37    46    55    64];


MATLAB redToBrown

No comments:

Post a Comment