function map4 = gen_map4_img(img_array)


index_range = -1:0.01:1;
size_i = size(img_array)
c_map4 = zeros(size_i(1),size_i(2),3);
for i = 1:size_i(1)
for j = 1:size_i(2)
        ind_i = img_array(i,j);
        if ind_i<=-0.8
                c_map4(i,j,1) = 13;
                c_map4(i,j,2) = 13;
                c_map4(i,j,3) = 13;
        elseif ind_i>-0.8 && ind_i <= -0.6
                c_map4(i,j,1) = 191;
                c_map4(i,j,2) = 191;
                c_map4(i,j,3) = 191;
        elseif ind_i>-0.6 && ind_i <= -0.4
                c_map4(i,j,1) = 219;
                c_map4(i,j,2) = 219;
                c_map4(i,j,3) = 219;
        elseif ind_i>-0.4 && ind_i <= -0.2
                c_map4(i,j,1) = 235;
                c_map4(i,j,2) = 235;
                c_map4(i,j,3) = 235;
        elseif ind_i>0.2 && ind_i <= 0
                c_map4(i,j,1) = 254;
                c_map4(i,j,2) = 250;
                c_map4(i,j,3) = 202;
        elseif ind_i>0 && ind_i <= 0.2
                c_map4(i,j,1) = 127;
                c_map4(i,j,2) = 179;
                c_map4(i,j,3) = 71;
        elseif ind_i>0.2 && ind_i <= 0.4
                c_map4(i,j,1) = 65;
                c_map4(i,j,2) = 125;
                c_map4(i,j,3) = 37;
	elseif ind_i>0.4 && ind_i <= 0.6
                c_map4(i,j,1) = 34;
                c_map4(i,j,2) = 96;
                c_map4(i,j,3) = 19;
        elseif ind_i>0.6 && ind_i <= 0.8
                c_map4(i,j,1) = 15;
                c_map4(i,j,2) = 83;
                c_map4(i,j,3) = 105;
        elseif ind_i>0.8
                c_map4(i,j,1) = 2;
                c_map4(i,j,2) = 69;
                c_map4(i,j,3) = 0;
        else
                c_map4(i,j,1) = 254;
                c_map4(i,j,2) = 250;
                c_map4(i,j,3) = 202;
        end
end
map4 = c_map4;

end
