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

Function test_set_offsets_late

lib/matplotlib/tests/test_collections.py:1281–1299  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1279
1280
1281def test_set_offsets_late():
1282 identity = mtransforms.IdentityTransform()
1283 sizes = [2]
1284
1285 null = mcollections.CircleCollection(sizes=sizes)
1286
1287 init = mcollections.CircleCollection(sizes=sizes, offsets=(10, 10))
1288
1289 late = mcollections.CircleCollection(sizes=sizes)
1290 late.set_offsets((10, 10))
1291
1292 # Bbox.__eq__ doesn't compare bounds
1293 null_bounds = null.get_datalim(identity).bounds
1294 init_bounds = init.get_datalim(identity).bounds
1295 late_bounds = late.get_datalim(identity).bounds
1296
1297 # offsets and transform are applied when set after initialization
1298 assert null_bounds != init_bounds
1299 assert init_bounds == late_bounds
1300
1301
1302def test_set_offset_transform():

Callers

nothing calls this directly

Calls 2

set_offsetsMethod · 0.45
get_datalimMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…