Open colormap editor
The Colormap Editor allows you to customize the colormap of the selected figure or axes.
Using the Colormap Editor, you can:
Choose a predefined colormap.
Import a saved colormap from the workspace.
Adjust the position of colors in the colormap.
Change the color at a specific position.
MATLAB® applies your changes to the colormap of the selected figure or axes.
MATLAB command prompt: Enter colormapeditor
.
Color markers
— Color markersColor markers allow you to change the color and length of transitions in the colormap. View and adjust color markers by opening the Specify Color tab.
This table describes the adjustments you can make.
Adjustment | Adjustment Instructions |
---|---|
Add a color marker | Click the displayed colormap. You can also
specify |
Select a marker | Click the marker. |
Select multiple markers | Click the first marker. Then hold the Ctrl key as you click the other markers. |
Move a marker | Click and drag the marker. Alternatively, select the marker and press the left and right arrow keys. You can move only one marker at a time. |
Delete a marker | Select the marker and then press the Delete key. |
Delete multiple markers | Select the markers and then press the Delete key. |
Change marker color | Double-click the marker and then choose a color from the dialog box. |
Current Index
— Index of color markerIndex of the color marker, specified as a positive integer between 1 and
Size
. View the index of a color marker by clicking
on it. Add a new marker by specifying Current
Index
.
Current CData
— Color data valueThis property is read-only.
Color data value in the CData
property of the
graphics object using the colormap, specified as a number between
CLim Minimum
and CLim
Maximum
.
Size
— Number of colorsNumber of colors, specified as an integer in the range [1, 1000].
Colorspace
— Interpolating colorspaceInterpolating colorspace, specified as one of these values:
RGB — MATLAB calculates values in the new colormap by linearly interpolating the red, green, and blue components of color.
HSV — MATLAB calculates values in the new colormap by linearly interpolating the hue, saturation, and value coordinates. Hue corresponds to the values on a color wheel that transition from red to orange, yellow, green, cyan, blue, magenta, and finally back to red. Hue interpolation is calculated as the shortest distance between adjacent colors on the color wheel.
When you change the colorspace, the Colormap Editor preserves the number, color, and location of markers, which can cause the colormap to change.
Reverse
— Colormap reversaloff
(default) | on
Colormap reversal, specified as one of these values:
on
– Reverse the order of colors in the
displayed colormap.
off
– Do not reverse the colormap.
These images show the parula
colormap with
Reverse
specified as off
and
on
.
off | on |
---|---|
|
|
CLim Minimum
— Colormap lower limitColormap lower limit, specified as a number. All values in your plot data
that are less than or equal to the value of CLim
Minimum
map to the first color in the colormap. All values
between CLim Minimum
and CLim
Maximum
map linearly to the intermediate colors of the
colormap.
When you change CLim Minimum
and CLim
Maximum
, those changes are reflected in the CLim
property of the
plotting axes.
CLim Maximum
— Colormap upper limitColormap upper limit, specified as a number. All values in your plot data
that are greater than or equal to the value of CLim
Maximum
map to the last color in the colormap. All values
between CLim Minimum
and CLim
Maximum
map linearly to the intermediate colors of the
colormap.
When you change CLim Minimum
and CLim
Maximum
, those changes are reflected in the CLim
property of the
plotting axes.
To import a colormap from the workspace, select Import.
To save a colormap to the workspace after making changes, select File > Save as or press Ctrl+S. Use the save
function to save the
colormap as a MAT-file for use in future sessions.