MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / test_masked_set_offsets

Function test_masked_set_offsets

lib/matplotlib/tests/test_collections.py:1351–1364  ·  view source on GitHub ↗
(fig_ref, fig_test)

Source from the content-addressed store, hash-verified

1349
1350@check_figures_equal()
1351def test_masked_set_offsets(fig_ref, fig_test):
1352 x = np.ma.array([1, 2, 3, 4, 5], mask=[0, 0, 1, 1, 0])
1353 y = np.arange(1, 6)
1354
1355 ax_test = fig_test.add_subplot()
1356 scat = ax_test.scatter(x, y)
1357 scat.set_offsets(np.ma.column_stack([x, y]))
1358 ax_test.set_xticks([])
1359 ax_test.set_yticks([])
1360
1361 ax_ref = fig_ref.add_subplot()
1362 ax_ref.scatter([1, 2, 5], [1, 2, 5])
1363 ax_ref.set_xticks([])
1364 ax_ref.set_yticks([])
1365
1366
1367def test_check_offsets_dtype():

Callers

nothing calls this directly

Calls 5

add_subplotMethod · 0.80
set_xticksMethod · 0.80
set_yticksMethod · 0.80
scatterMethod · 0.45
set_offsetsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…