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

Function check

lib/matplotlib/tests/test_backend_bases.py:30–46  ·  view source on GitHub ↗
(master_transform, paths, all_transforms,
              offsets, facecolors, edgecolors)

Source from the content-addressed store, hash-verified

28 edgecolors = ['red', 'green']
29
30 def check(master_transform, paths, all_transforms,
31 offsets, facecolors, edgecolors):
32 rb = RendererBase()
33 raw_paths = list(rb._iter_collection_raw_paths(
34 master_transform, paths, all_transforms))
35 gc = rb.new_gc()
36 ids = [path_id for xo, yo, path_id, gc0, rgbFace in
37 rb._iter_collection(
38 gc, range(len(raw_paths)), offsets,
39 transforms.AffineDeltaTransform(master_transform),
40 facecolors, edgecolors, [], [], [False],
41 [], 'screen', hatchcolors=[])]
42 uses = rb._iter_collection_uses_per_path(
43 paths, all_transforms, offsets, facecolors, edgecolors)
44 if raw_paths:
45 seen = np.bincount(ids, minlength=len(raw_paths))
46 assert set(seen).issubset([uses - 1, uses])
47
48 check(id, paths, tforms_matrices, offsets, facecolors, edgecolors)
49 check(id, paths[0:1], tforms_matrices, offsets, facecolors, edgecolors)

Callers 1

test_uses_per_pathFunction · 0.70

Calls 5

new_gcMethod · 0.95
_iter_collectionMethod · 0.95
RendererBaseClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…