- Matplotlib 3.0 Cookbook
- Srinivasa Rao Poladi
- 31字
- 2025-04-04 16:06:37
How to do it...
The following code block generates 50 random points, creates triangles automatically, and then plots the triangulation plot:
data = np.random.rand(50, 2)
triangles = tri.Triangulation(data[:,0], data[:,1])
plt.triplot(triangles)
plt.show()