Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
6.0.0 - Русский

Change language to:
English - Français - 日本語 - Português -

Please note that the recommended version of Scilab is 2024.0.0. This page might be outdated.
See the recommended documentation of this function

Справка Scilab >> Графики > color_management > colormap

colormap

using colormaps

Description

A colormap cmap is defined by a m x 3 matrix. m is the number of colors. Color number i is given as a 3-uple cmap(i,1), cmap(i,2) cmap(i,3) corresponding respectively to red, green and blue intensity between 0 and 1.

At the beginning, 32 colors are defined in the colormap. You can change the colormap of a figure by using set(f,"color_map",cmap) where f is the handle of the figure.

Each color in the colormap has an id you have to use to specify color in most plot functions. To see the ids, use function getcolor.

The functions hotcolormap, jetcolormap and graycolormap provide colormaps with continuous variation of the colors.

You can get the default colormap by cmap=get(sdf(),"color_map").

Examples

n=64;
r=linspace(0,1,n)';
g=linspace(1,0,n)';
b=ones(r);
cmap=[r g b];
f=gcf(); f.color_map=cmap;
plot3d1()
f.color_map=get(sdf(),"color_map");

See also

Report an issue
<< colordef color_management getcolor >>

Copyright (c) 2022-2023 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Tue Feb 14 15:13:26 CET 2017