colormaplist
Provide list of colormaps.
📝Syntax
colormaps = colormaplist()
📤Output Arguments
Parameter Description
colormaps String vector of colormaps sorted in ascending order.
📄Description

colormaplist returns the available colormaps as an m-by-1 string array.

💡Examples
f = figure('Position', [100, 100, 600, 400], 'Resize', 'off');
ax = axes('Position', [0.1, 0.2, 0.6, 0.7]);
surf(ax, peaks);
cmaps = colormaplist;
listbox = uicontrol('Style', 'listbox', 'Position', [450, 100, 100, 200], 'String', cmaps);
listbox.Callback = @(src, void) colormap(ax, cmaps(src.Value));
Example illustration
🔗See Also
colormap
🕔Version History
Version Description
1.14.0 initial version
Edit this page on GitHub