Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
2025.0.0 - 日本語


colormap

set and/or get a figure colormap.

Syntax

cmap = colormap()
cmap = colormap(h)

cmap = colormap(m)
cmap = colormap(h, m)

colormap(m)
colormap(h, m)

Arguments

h

A figure handle. If not given the current figure is used (See gcf).

m

A string (function name), a function, a Nx3 double matrix or "default" (to reset colormap to the default one). The color map to be used.

Description

colormap function is a helper to manage colormaps.

cmap = colormap() returns the current figure colormap.

cmap = colormap(h) returns the colormap of the figure handle h.

[cmap =] colormap(m) sets the colormap m to the current figure. cmap is only returned when the output of the function is assigned.

[cmap =] colormap(h, m) sets the colormap m to the figure handle h. cmap is only returned when the output of the function is assigned.

Examples

plot3d();
// Change colormap to parula (32 values)
colormap(parula(32));
// Change colormap to jet (default size)
colormap(jet); // Equivalent to colormap("jet")

See also

  • Using colormaps — カラーマップを定義
  • jet
  • parula
  • gcf — カレントグラフィックウインドウのハンドルを返す.

History

バージョン記述
2024.1.0 Function colormap introduced.
Report an issue
<< colormaps colormaps colormaps >>

Copyright (c) 2022-2024 (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:
Thu Oct 24 11:17:42 CEST 2024