2
2
Demonstrates high-resolution tricontouring on user-defined triangular grids
3
3
with matplotlib.tri.UniformTriRefiner
4
4
"""
5
- from matplotlib .tri import Triangulation , UniformTriRefiner
5
+ import matplotlib .tri as tri
6
6
import matplotlib .pyplot as plt
7
7
import matplotlib .cm as cm
8
8
import numpy as np
@@ -43,7 +43,7 @@ def function_z(x, y):
43
43
# Now create the Triangulation.
44
44
# (Creating a Triangulation without specifying the triangles results in the
45
45
# Delaunay triangulation of the points.)
46
- triang = Triangulation (x , y )
46
+ triang = tri . Triangulation (x , y )
47
47
48
48
# Mask off unwanted triangles.
49
49
xmid = x [triang .triangles ].mean (axis = 1 )
@@ -54,7 +54,7 @@ def function_z(x, y):
54
54
#-----------------------------------------------------------------------------
55
55
# Refine data
56
56
#-----------------------------------------------------------------------------
57
- refiner = UniformTriRefiner (triang )
57
+ refiner = tri . UniformTriRefiner (triang )
58
58
tri_refi , z_test_refi = refiner .refine_field (z , subdiv = 3 )
59
59
60
60
#-----------------------------------------------------------------------------
0 commit comments