Home > Common Problem > body text

How to use colormap

小老鼠
Release: 2023-11-30 17:20:39
Original
1128 people have browsed it

Colormap is mainly used in MATLAB to change the color display of graphics. Its usage is as follows:

  1. colormap(MAP) uses the MAP matrix to map the color map of the current graphic.

  2. colormap('default') The default setting is JET.

  3. MAP = colormap gets the current colormap matrix.

  4. colormap(AX,...) applies the colormap to the graphic corresponding to the AX coordinates, not the current graphic.

In addition, the input of colormap is a matrix (n*3) containing arbitrary rows but only three columns. The colors in the matrix are numbers between 0-1, and each Three numbers in a row will be mapped to a color. The three values ​​correspond to the intensity of the three color channels of R (red), G (green), and B (blue). By changing the intensity of the three channel values, All the colors we need can be mapped. For example, (0,0,0) is mapped to black and (1,1,1) is mapped to white.

The above is the detailed content of How to use colormap. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!