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

Function test_array_dimensions

lib/matplotlib/tests/test_collections.py:1256–1269  ·  view source on GitHub ↗
(pcfunc)

Source from the content-addressed store, hash-verified

1254
1255
1256def test_array_dimensions(pcfunc):
1257 # Make sure we can set the 1D, 2D, and 3D array shapes
1258 z = np.arange(12).reshape(3, 4)
1259 pc = getattr(plt, pcfunc)(z)
1260 # 1D
1261 pc.set_array(z.ravel())
1262 pc.update_scalarmappable()
1263 # 2D
1264 pc.set_array(z)
1265 pc.update_scalarmappable()
1266 # 3D RGB is OK as well
1267 z = np.arange(36, dtype=np.uint8).reshape(3, 4, 3)
1268 pc.set_array(z)
1269 pc.update_scalarmappable()
1270
1271
1272def test_get_segments():

Callers

nothing calls this directly

Calls 2

update_scalarmappableMethod · 0.80
set_arrayMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…