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
See also
- Using colormaps — mapa de cores
- jet
- parula
- gcf — Retorna o manipulador da janela GUI ou de gráficos corrente.
History
Versão | Descrição | |
2024.1.0 | Function colormap introduced. |
Report an issue | ||
<< Mapas de cores | Mapas de cores | colormaps >> |