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

Method contains_branch

lib/matplotlib/transforms.py:1433–1450  ·  view source on GitHub ↗

Return whether the given transform is a sub-tree of this transform. This routine uses transform equality to identify sub-trees, therefore in many situations it is object id which will be used. For the case where the given transform represents the whole of t

(self, other)

Source from the content-addressed store, hash-verified

1431 return 1
1432
1433 def contains_branch(self, other):
1434 """
1435 Return whether the given transform is a sub-tree of this transform.
1436
1437 This routine uses transform equality to identify sub-trees, therefore
1438 in many situations it is object id which will be used.
1439
1440 For the case where the given transform represents the whole
1441 of this transform, returns True.
1442 """
1443 if self.depth < other.depth:
1444 return False
1445
1446 # check that a subtree is equal to other (starting from self)
1447 for _, sub_tree in self._iter_break_from_left_to_right():
1448 if sub_tree == other:
1449 return True
1450 return False
1451
1452 def contains_branch_separately(self, other_transform):
1453 """

Callers 6

get_datalimMethod · 0.45
_apply_paramsMethod · 0.45
imshowMethod · 0.45
test_contains_branchMethod · 0.45

Calls 1

Tested by 1

test_contains_branchMethod · 0.36