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

Skip to content

Commit 09e49c3

Browse files
committed
Modify test to include test of verts kwarg.
1 parent b109635 commit 09e49c3

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

lib/matplotlib/tests/test_axes.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1283,7 +1283,7 @@ def test_scatter_plot():
12831283
@image_comparison(baseline_images=['scatter_marker'], remove_text=True,
12841284
extensions=['png'])
12851285
def test_scatter_marker():
1286-
fig, (ax0, ax1) = plt.subplots(ncols=2)
1286+
fig, (ax0, ax1, ax2) = plt.subplots(ncols=3)
12871287
ax0.scatter([3, 4, 2, 6], [2, 5, 2, 3],
12881288
c=[(1, 0, 0), 'y', 'b', 'lime'],
12891289
s=[60, 50, 40, 30],
@@ -1294,6 +1294,16 @@ def test_scatter_marker():
12941294
s=[60, 50, 40, 30],
12951295
edgecolors=['k', 'r', 'g', 'b'],
12961296
marker=mmarkers.MarkerStyle('o', fillstyle='top'))
1297+
# unit area ellipse
1298+
rx, ry = 3, 1
1299+
area = rx * ry * np.pi
1300+
theta = np.linspace(0, 2 * np.pi, 21)
1301+
verts = list(zip(np.cos(theta) * rx / area, np.sin(theta) * ry / area))
1302+
ax2.scatter([3, 4, 2, 6], [2, 5, 2, 3],
1303+
c=[(1, 0, 0), 'y', 'b', 'lime'],
1304+
s=[60, 50, 40, 30],
1305+
edgecolors=['k', 'r', 'g', 'b'],
1306+
verts=verts)
12971307

12981308

12991309
@image_comparison(baseline_images=['scatter_2D'], remove_text=True,

0 commit comments

Comments
 (0)