The pcolor-of MATLAB to draw pseudo color graph __matlab

Source: Internet
Author: User

function: Draw pseudo color graph. The graph is a rectangular element and a color array defined by parameter C, and the system generates a pseudo color graph by means of a surface patch defined by each adjacent four point in C. A color graph is a "plane" surface view from above to the bottom. If the user uses the command to shading faceted or shading flat, the fixed color of each cell is related to the color of the angle to which it is connected. So, C (I,J) defines the color of row I and column J of the cell. The last line in C is useless with the last column. If the user uses the command shading Interp, the color of each cell is the color of a pair of linear interpolation for its four vertices, then all elements of C are in the operation.

Syntax Introduction:

Pcolor (c) Draws a pseudo color graph of the specified color C. Parameter c is a matrix, and its elements are linearly mapped to the current color graph subscript. Pcolor (X,Y,C) draws a pseudo color graph that specifies the spacing between the specified color C and the specified grid lines. Parameters x and y are vectors or matrices that specify the spacing between grids. If the x,y is a matrix, the X and y,c dimensions are the same, and if the x,y is a vector, the x,y length equals the number of columns and rows of the matrix C respectively. Pcolor (Axes_handles,...) Draws a pseudo color graph on the axis on which the handle is axes_handle. H=pcolor (...) returns the handle of the surface drawing object to H.

Cases:

>> C=rand (10);
>> Pcolor (C)


2.>> x=[1 2 3 4 5 6];
>> y=[2 4 8 10 12 14];
>> C=rand (6);
>> Pcolor (X,Y,C)


3.>> X=[1:3;2:4;1:3];
>> Y=[1:2:6;2:4;1:3];
>> C=rand (3);
>> Pcolor (X,Y,C)


4.

>> H=pcolor (C)
H =
174.0135

"Image function and its application"-knowledge》

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.