1 <?xml version="1.0" encoding="UTF-8"?>
3 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
6 * Copyright (C) 2012 - 2016 - Scilab Enterprises
8 * This file is hereby licensed under the terms of the GNU GPL v2.0,
9 * pursuant to article 5.3.4 of the CeCILL v.2.1.
10 * This file was originally licensed under the terms of the CeCILL v2.1,
11 * and continues to be available under such terms.
12 * For more information, see the COPYING file which you should have received
13 * along with this program.
16 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="colormap">
18 <refname>colormap</refname>
19 <refpurpose>using colormaps</refpurpose>
22 <title>Description</title>
24 A colormap <literal>cmap</literal> is defined by a m x 3 matrix. m is the number of colors.
25 Color number i is given as a 3-uple <literal>cmap(i,1)</literal>, <literal>cmap(i,2)</literal>
26 <literal>cmap(i,3)</literal>
27 corresponding respectively to red, green and blue intensity between
31 At the beginning, 32 colors are defined in the colormap. You can
32 change the colormap of a figure by using <literal>set(f,"color_map",cmap)</literal>
33 where <literal>f</literal> is the handle of the figure.
36 Each color in the colormap has an id you have to use to specify color
37 in most plot functions. To see the ids, use function <link linkend="getcolor">getcolor</link>.
40 The functions <link linkend="hotcolormap">hotcolormap</link>, <link linkend="jetcolormap">jetcolormap</link> and <link linkend="graycolormap">graycolormap</link>
41 provide colormaps with continuous variation of the colors.
44 You can get the default colormap by <literal>cmap=get(sdf(),"color_map")</literal>.
48 <title>Examples</title>
49 <programlisting role="example"><![CDATA[
55 f=gcf(); f.color_map=cmap;
57 f.color_map=get(sdf(),"color_map");
65 f=gcf(); f.color_map=cmap;
67 f.color_map=get(sdf(),"color_map");
71 <refsection role="see also">
72 <title>See also</title>
73 <simplelist type="inline">
75 <link linkend="autumncolormap">autumncolormap</link>
78 <link linkend="bonecolormap">bonecolormap</link>
81 <link linkend="coolcolormap">coolcolormap</link>
84 <link linkend="coppercolormap">coppercolormap</link>
87 <link linkend="graycolormap">graycolormap</link>
90 <link linkend="hotcolormap">hotcolormap</link>
93 <link linkend="hsvcolormap">hsvcolormap</link>
96 <link linkend="jetcolormap">jetcolormap</link>
99 <link linkend="oceancolormap">oceancolormap</link>
102 <link linkend="parulacolormap">parulacolormap</link>
105 <link linkend="pinkcolormap">pinkcolormap</link>
108 <link linkend="rainbowcolormap">rainbowcolormap</link>
111 <link linkend="springcolormap">springcolormap</link>
114 <link linkend="summercolormap">summercolormap</link>
117 <link linkend="whitecolormap">whitecolormap</link>
120 <link linkend="wintercolormap">wintercolormap</link>
123 <link linkend="color">color</link>
126 <link linkend="getcolor">getcolor</link>