matplotlib.pyplot.triplot#

matplotlib.pyplot.triplot(*args, **kwargs)[source]#

将非结构化三角形网格绘制为线和/或标记。

调用签名

triplot(triangulation, ...)
triplot(x, y, [triangles], *, [mask=mask], ...)

可以通过将一个 Triangulation 对象作为第一个参数来指定三角网格,或者通过传入点 xy 以及可选的 trianglesmask 来指定。如果既没有给出 triangulation 也没有给出 triangles,则三角剖分会即时计算。

参数:
triangulationTriangulation

已创建的三角网格。

x, y, triangles, mask

定义三角网格的参数。参见 Triangulation。这与指定 triangulation 互斥。

其他参数

所有其他 args 和 kwargs 都转发给 plot

返回:
linesLine2D

绘制的三角形边。

markersLine2D

绘制的标记节点。

备注

注意

这是 pyplot 封装器,对应于 axes.Axes.triplot

使用 matplotlib.pyplot.triplot 的示例#

三角平滑 Delaunay 等高线

三角平滑 Delaunay 等高线

三角梯度演示

三角梯度演示

三角插值演示

三角插值演示

三角图演示

三角图演示