Note that when you switch from one colorspace to another, the color editor preserves the number, color, and location of the node pointers, which can cause the colormap to change. Switching to the HSV colorspace causes the colormap editor to recalculate the colors between nodes using the hue, saturation, and value components of the color definition. For example, in the RGB colorspace, internode colors are calculated by linearly interpolating the red, green, and blue intensity values from one node to the next. The colorspace determines what values are used to calculate the colors of cells between nodes. The value from the graphics object color data that is mapped to the node's color (i.e., data from the CData property of any image, patch, or surface objects in the figure).When you put the mouse over a color cell or node pointer, the colormap editor displays the following information about that colormap element: Select the nodes and then press the Delete key, or select Delete from the Edit menu, or type Ctrl+x. Select the node and then press the Delete key, or select Delete from the Edit menu, or type Ctrl+x. Movement stops when one of the selected nodes hits an unselected node or an end node. Select multiple nodes and use the left and right arrow keys to move nodes as a group. Select and drag with the mouse or select and use the left and right arrow keys. Nonadjacent: left-click on first node, Ctrl+click on subsequent nodes After you select a new color at a node, MATLAB reinterpolates the colors in between nodes.Ĭlick below the corresponding cell in the colormap stripĪdjacent: left-click on first node, Shift+click on the last node MATLAB displays a color picker from which you can select a new color. The color of a node pointer remains constant as you move it, but the colormap changes by linearly interpolating the RGB values between nodes.Ĭhange the color at a node by double-clicking the node pointer. You can select and move node pointers to change a range of colors in the colormap. You can also start the colormap editor by selecting Colormap from the Edit menu. You can also work in the HSV colorspace by setting the Interpolating Colorspace selector to HSV.
Node pointers are colored cells below the colormap strip that indicate points in the colormap where the rate of the variation of R, G, and B values change. Colormapeditor (MATLAB Functions) MATLAB Function Referenceĭisplays the current figure's colormap as a strip of rectangular cells in the colormap editor.