Documentation

redbluecmap

Create red and blue colormap

Syntax

redbluecmap(Length)

Arguments

LengthPositive integer that specifies the length of (or the number of colors in) the colormap. Choices are positive integers ≥ 3 or ≤ 11. Default is 11.

Description

redbluecmap(Length) returns a Length-by-3 matrix containing a red and blue diverging color palette. Low values are dark blue, values in the center of the map are white, and high values are dark red. Length is a positive integer ≥ 3 and ≤ 11, which determines the number of colors in the colormap. Default is 11.

Examples

  1. Load the MAT-file, provided with the Bioinformatics Toolbox™ software, that contains yeastvalues, a matrix of gene expression data. Create a clustergram object and display the dendrograms and heat map from the gene expression data in the first 30 rows of the yeastvalues matrix.

    load filteredyeastdata
    cgo = clustergram(yeastvalues(1:30,:))
    Clustergram object with 30 rows of nodes and 7 columns of nodes.

  2. Reset the colormap of the heat map to redbluecmap.

    set(cgo,'Colormap',redbluecmap);

Was this topic helpful?