码迷,mamicode.com
首页 > 其他好文 > 详细

matplotlib.pyplot.pcolormesh

时间:2019-01-26 22:41:33      阅读:415      评论:0      收藏:0      [点我收藏+]

标签:hose   intro   may   矩形   lte   bsp   parameter   ase   alt   

 matplotlib.pyplot.pcolormesh(*argsalpha=Nonenorm=Nonecmap=Nonevmin=Nonevmax=Noneshading=‘flat‘antialiased=Falsedata=None**kwargs)      创建一个带有不规则矩形网格的伪彩色图

 
Parameters:
C array_like

A scalar 2-D array. The values will be color-mapped.

X, Y array_like, optional

The coordinates of the quadrilateral corners. The quadrilateral for C[i,j] has corners at:

(X[i+1, j], Y[i+1, j])          (X[i+1, j+1], Y[i+1, j+1])
                      +--------+
                      | C[i,j] |
                      +--------+
    (X[i, j], Y[i, j])          (X[i, j+1], Y[i, j+1]),

Note that the column index corresponds to the x-coordinate, and the row index corresponds to y. For details, see the Notes section below.

The dimensions of X and Y should be one greater than those of C. Alternatively, XY and C may have equal dimensions, in which case the last row and column of C will be ignored.

If X and/or Y are 1-D arrays or column vectors they will be expanded as needed into the appropriate 2-D arrays, making a rectangular grid.

cmap str or Colormap, optional

A Colormap instance or registered colormap name. The colormap maps the C values to colors. Defaults to rcParams["image.cmap"].

norm Normalize, optional

The Normalize instance scales the data values to the canonical colormap range [0, 1] for mapping to colors. By default, the data range is mapped to the colorbar range using linear scaling.

Normalize实例将数据值缩放到用于映射到颜色的规范化colormap范围[0,1]。默认情况下,使用线性缩放将数据范围映射到colorbar范围。

vmin, vmax scalar, optional, default: None

The colorbar range. If None, suitable min/max values are automatically chosen by the Normalizeinstance (defaults to  the respective min/max values of C in case of the default linear scaling).

edgecolors {‘none‘, None, ‘face‘, color, color sequence}, optional

  边缘颜色,默认None:

The singular form edgecolor works as an alias.

alpha scalar, optional, default: None

  透明度

shading {‘flat‘, ‘gouraud‘}, optional

The fill style, Possible values:

  填充式样

  • ‘flat‘: A solid color is used for each quad. The color of the quad (i, j), (i+1, j), (i, j+1), (i+1, j+1) is given by C[i,j].
  • ‘gouraud‘: Each quad will be Gouraud shaded: The color of the corners (i‘, j‘) are given by C[i‘,j‘]. The color values of the area in between is interpolated from the corner values. When Gouraud shading is used, edgecolors is ignored.
snap bool, optional, default: False

Whether to snap the mesh to pixel boundaries.

Returns:
mesh matplotlib.collections.QuadMesh

 

 

matplotlib.pyplot.pcolormesh

标签:hose   intro   may   矩形   lte   bsp   parameter   ase   alt   

原文地址:https://www.cnblogs.com/darcy471/p/10325106.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!