Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cdb08ce

Browse files
committed
Merge two contour tests.
1 parent 421daf3 commit cdb08ce

File tree

1 file changed

+3
-16
lines changed

1 file changed

+3
-16
lines changed

lib/matplotlib/tests/test_contour.py

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -109,29 +109,16 @@ def test_contour_uniform_z():
109109
assert len(record) == 1
110110

111111

112-
@image_comparison(['contour_manual_labels'],
113-
savefig_kwarg={'dpi': 200}, remove_text=True, style='mpl20')
112+
@image_comparison(['contour_manual_labels'], remove_text=True, style='mpl20')
114113
def test_contour_manual_labels():
115-
116114
x, y = np.meshgrid(np.arange(0, 10), np.arange(0, 10))
117115
z = np.max(np.dstack([abs(x), abs(y)]), 2)
118116

119117
plt.figure(figsize=(6, 2), dpi=200)
120118
cs = plt.contour(x, y, z)
121-
pts = np.array([(1.5, 3.0), (1.5, 4.4), (1.5, 6.0)])
119+
pts = np.array([(1.0, 3.0), (1.0, 4.4), (1.0, 6.0)])
122120
plt.clabel(cs, manual=pts)
123-
124-
125-
@image_comparison(['contour_labels_size_color.png'],
126-
remove_text=True, style='mpl20')
127-
def test_contour_labels_size_color():
128-
129-
x, y = np.meshgrid(np.arange(0, 10), np.arange(0, 10))
130-
z = np.max(np.dstack([abs(x), abs(y)]), 2)
131-
132-
plt.figure(figsize=(6, 2))
133-
cs = plt.contour(x, y, z)
134-
pts = np.array([(1.5, 3.0), (1.5, 4.4), (1.5, 6.0)])
121+
pts = np.array([(2.0, 3.0), (2.0, 4.4), (2.0, 6.0)])
135122
plt.clabel(cs, manual=pts, fontsize='small', colors=('r', 'g'))
136123

137124

0 commit comments

Comments
 (0)