Wednesday, 9 September 2009

ColorMap

A colormap is an m-by-3 matrix of real numbers between 0.0 and 1.0. Each row is an RGB vector that defines one color. The kth row of the colormap defines the kth color, where map(k,:) = [r(k) g(k) b(k)]) specifies the intensity of red, green, and blue.

colormap(map) sets the colormap to the matrix map. If any values in map are outside the interval [0 1], you receive the error Colormap must have values in [0,1].

colormap('default') sets the current colormap to the default colormap.

cmap = colormap retrieves the current colormap. The values returned are in the interval [0 1].

colormap(ax,...) uses the figure corresponding to axes ax instead of the current figure.


Essentially, colormap uses colors to map z-axis information - if the x and y-axes are assumed to be in their traditional orientation. The image above is a fuel map utilizing the "jet" colormap. What I find interesting is the use of color to show information in two dimensions that actually represents three dimensions in real-world testing. Colormap is interesting in its flexibility and breadth of data-set representations.

No comments:

Post a Comment