Skip to Main Content Skip to Search
Product Documentation

redgreencmap - Create red and green colormap

Syntax

redgreencmap(Length)

redgreencmap(Length, 'Interpolation', InterpolationValue)

Arguments

Length

Length of the colormap. Enter either 256 or 64. Default is the length of the colormap of the current figure.

InterpolationValueProperty that lets you set the algorithm for color interpolation. Choices are:
  • 'linear'

  • 'quadratic'

  • 'cubic'

  • 'sigmoid' (default)

    Note   The sigmoid interpolation is tanh.

Description

redgreencmap(Length) returns a Length-by-3 matrix containing a red and green colormap. Low values are bright green, values in the center of the map are black, and high values are red. Enter either 256 or 64 for Length. If Length is empty, the length of the map will be the same as the length of the colormap of the current figure.


redgreencmap(Length, 'Interpolation', InterpolationValue)
lets you set the algorithm for color interpolation. Choices are:

Examples

  1. Create a MATLAB structure from the microarray data in a GenePix Results (GPR) file, then display an image of the 'F635 Median' field.

    pd = gprread('mouse_a1pd.gpr');
    maimage(pd,'F635 Median')

  2. Reset the colormap of the current figure.

    colormap(redgreencmap)

See Also

clustergram | colormap | colormapeditor | redbluecmap

  


Free Computational Biology Interactive Kit

See how to analyze, visualize, and model biological data and systems using MathWorks products.

Get free kit

Trials Available

Try the latest computational biology products.

Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS