Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5179da9

Browse filesBrowse files
committed
Add test for scatter_2D
1 parent e098780 commit 5179da9
Copy full SHA for 5179da9

File tree

Expand file treeCollapse file tree

2 files changed

+14
-3
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+14
-3
lines changed
Loading

‎lib/matplotlib/tests/test_axes.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_axes.py
+14-3Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1241,6 +1241,17 @@ def test_scatter_marker():
12411241
marker=mmarkers.MarkerStyle('o', fillstyle='top'))
12421242

12431243

1244+
@image_comparison(baseline_images=['scatter_2D'], remove_text=True,
1245+
extensions=['png'])
1246+
def test_scatter_2D():
1247+
x = np.arange(3)
1248+
y = np.arange(2)
1249+
x, y = np.meshgrid(x, y)
1250+
z = x + y
1251+
fig, ax = plt.subplots()
1252+
ax.scatter(x, y, c=z, s=200, edgecolors='face')
1253+
1254+
12441255
@cleanup
12451256
def test_as_mpl_axes_api():
12461257
# tests the _as_mpl_axes api
@@ -2150,17 +2161,17 @@ def test_errorbar():
21502161
def test_errorbar_shape():
21512162
fig = plt.figure()
21522163
ax = fig.gca()
2153-
2164+
21542165
x = np.arange(0.1, 4, 0.5)
21552166
y = np.exp(-x)
21562167
yerr1 = 0.1 + 0.2*np.sqrt(x)
21572168
yerr = np.vstack((yerr1, 2*yerr1)).T
21582169
xerr = 0.1 + yerr
2159-
2170+
21602171
assert_raises(ValueError, ax.errorbar, x, y, yerr=yerr, fmt='o')
21612172
assert_raises(ValueError, ax.errorbar, x, y, xerr=xerr, fmt='o')
21622173
assert_raises(ValueError, ax.errorbar, x, y, yerr=yerr, xerr=xerr, fmt='o')
2163-
2174+
21642175

21652176
@image_comparison(baseline_images=['errorbar_limits'])
21662177
def test_errorbar_limits():

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.