- Matplotlib 3.0 Cookbook
- Srinivasa Rao Poladi
- 31字
- 2021-08-13 15:16:02
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()