creates a beautiful colormap
[map,map_number] = sip_colormap(colormap_name_or_number [,number_of_colors])
Default is 256 (8 bits).
If this number is negative, then the function will return the complimentary colormap.
sip_colormap(colormap_number,[number_of_colors])
returns one the
predefined colormaps.
sip_colormap()
shows the available names.
These colormaps were created by Enrico Segre and are from the ENRICO toolbox. Have a look at this toolbox if you want to improve Scilab displays.
image=imread(SIPDIR+'images/photonics/laser1.jpg'); //reads an indexed image map=sip_colormap(10,256); //takes the colormap number 19 //it's the same as: map=sip_colormap('sunrise',256); clf;imshow(image,map); //display in false colors //For 3D plots, with the map number 16 ('prism') xset("window",1);xset("colormap",sip_colormap(16,256)); [r,c]=size(image); plot3d1(1:4:r,1:4:c,image(1:4:r,1:4:c)) //You can have the complimentary colormap with comp_map=abs(1-map); clf;imshow(image,comp_map); //or simply:comp_map=sip_coloramp(16,-256) //To reverse the color order: invmap(256:-1:1,1:3)=sip_colormap(7,256); //To display a colormap: map1=ones(1:100)'*(256:-1:1); clf;imshow(map1',sip_colormap(4)) //will display the colormap number 4 in 256 colors |