/[MITgcm]/MITgcm_contrib/jmc_script/change_colmap.m
ViewVC logotype

Contents of /MITgcm_contrib/jmc_script/change_colmap.m

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Thu Jan 10 18:27:54 2013 UTC (11 years, 3 months ago) by jmc
Branch: MAIN
CVS Tags: testing_tag01, HEAD
some useful matlab script

1 function [col,mapC]=change_colmap(kchg);
2 % CHANGE_COLMAP :: simple function to modify the default colormap
3 % [col,mapC]=change_colmap(-1) :: replace 1rst color with white
4 % [col,mapC]=change_colmap(2) :: I don't remember ...
5
6 % $Header: $
7 % $Name: $
8
9 col=[1:64];
10 colormap('default'); mapC=colormap;
11 if kchg == -1,
12 mapC(1,:)=[1 1 1]; colormap(mapC);
13 elseif kchg == 2,
14 col(3:18)=[46 33 44 27 42:-2:20] ; col(9)=51; col(13)=50; col(16)=35;
15 col(19:34)=[58 49:-2:37 23 48 31 43 30 25:-2:21]; col(23)=52;
16 col(35:47)=[29 53:64]; col(41)=38;
17 col(48:64)=19:-1:3;
18 map2=zeros(64,3); map2([1:64],:)=mapC(col([1:64]),:); mapC=map2;
19 mapC(1,:)=[1 1 1]; colormap(mapC);
20 end
21 return
22

  ViewVC Help
Powered by ViewVC 1.1.22