|
25 | 25 | """ |
26 | 26 | from matplotlib.tri import Triangulation, TriAnalyzer, UniformTriRefiner |
27 | 27 | import matplotlib.pyplot as plt |
28 | | -import matplotlib.cm as cm |
29 | 28 | import numpy as np |
30 | 29 |
|
31 | 30 |
|
@@ -114,19 +113,18 @@ def experiment_res(x, y): |
114 | 113 |
|
115 | 114 | # Graphical options for tricontouring |
116 | 115 | levels = np.arange(0., 1., 0.025) |
117 | | -cmap = cm.get_cmap(name='Blues', lut=None) |
118 | 116 |
|
119 | 117 | fig, ax = plt.subplots() |
120 | 118 | ax.set_aspect('equal') |
121 | 119 | ax.set_title("Filtering a Delaunay mesh\n" |
122 | 120 | "(application to high-resolution tricontouring)") |
123 | 121 |
|
124 | 122 | # 1) plot of the refined (computed) data contours: |
125 | | -ax.tricontour(tri_refi, z_test_refi, levels=levels, cmap=cmap, |
| 123 | +ax.tricontour(tri_refi, z_test_refi, levels=levels, cmap='Blues', |
126 | 124 | linewidths=[2.0, 0.5, 1.0, 0.5]) |
127 | 125 | # 2) plot of the expected (analytical) data contours (dashed): |
128 | 126 | if plot_expected: |
129 | | - ax.tricontour(tri_refi, z_expected, levels=levels, cmap=cmap, |
| 127 | + ax.tricontour(tri_refi, z_expected, levels=levels, cmap='Blues', |
130 | 128 | linestyles='--') |
131 | 129 | # 3) plot of the fine mesh on which interpolation was done: |
132 | 130 | if plot_refi_tri: |
|
0 commit comments