axes.Axes.tripcolor

matplotlib.axes.Axes.tripcolor

Axes.tripcolor(*args, **kwargs)

Create a pseudocolor plot of an unstructured triangular grid.

The triangulation can be specified in one of two ways; either:

tripcolor(triangulation, ...)

where triangulation is a matplotlib.tri.Triangulation object, or

tripcolor(x, y, ...)
tripcolor(x, y, triangles, ...)
tripcolor(x, y, triangles=triangles, ...)
tripcolor(x, y, mask=mask, ...)
tripcolor(x, y, triangles, mask=mask, ...)

in which case a Triangulation object will be created. See Triangulation for a explanation of these possibilities.

The next argument must be C, the array of color values, either one per point in the triangulation if color values are defined at points, or one per triangle in the triangulation if color values are defined at triangles. If there are the same number of points and triangles in the triangulation it is assumed that color values are defined at points; to force the use of color values at triangles use the kwarg facecolors*=C instead of just *C.

shading may be ‘flat’ (the default) or ‘gouraud’. If shading is ‘flat’ and C values are defined at points, the color values used for each triangle are from the mean C of the triangle’s three points. If shading is ‘gouraud’ then color values must be defined at points.

The remaining kwargs are the same as for pcolor().

Example:

(Source code)

../../_images/tripcolor_demo_00.png

(png, pdf)

../../_images/tripcolor_demo_01.png

(png, pdf)

../../_images/tripcolor_demo_02.png

(png, pdf)

© 2012–2017 Matplotlib Development Team. All rights reserved.
Licensed under the Matplotlib License Agreement.
http://matplotlib.org/2.0.2/api/_as_gen/matplotlib.axes.Axes.tripcolor.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部