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

Method contains_branch_separately

lib/matplotlib/transforms.py:1452–1468  ·  view source on GitHub ↗

Return whether the given branch is a sub-tree of this transform on each separate dimension. A common use for this method is to identify if a transform is a blended transform containing an Axes' data transform. e.g.:: x_isdata, y_isdata = trans.contains_

(self, other_transform)

Source from the content-addressed store, hash-verified

1450 return False
1451
1452 def contains_branch_separately(self, other_transform):
1453 """
1454 Return whether the given branch is a sub-tree of this transform on
1455 each separate dimension.
1456
1457 A common use for this method is to identify if a transform is a blended
1458 transform containing an Axes' data transform. e.g.::
1459
1460 x_isdata, y_isdata = trans.contains_branch_separately(ax.transData)
1461
1462 """
1463 if self.output_dims != 2:
1464 raise ValueError('contains_branch_separately only supports '
1465 'transforms with 2 output dimensions')
1466 # for a non-blended transform each separate dimension is the same, so
1467 # just return the appropriate shape.
1468 return (self.contains_branch(other_transform), ) * 2
1469
1470 # Permanent alias for backwards compatibility (historical typo)
1471 def contains_branch_seperately(self, other_transform):

Callers 11

get_datalimMethod · 0.45
_process_argsMethod · 0.45
_update_line_limitsMethod · 0.45
_update_patch_limitsMethod · 0.45
hlinesMethod · 0.45
vlinesMethod · 0.45
_update_pcolor_limsMethod · 0.45
test_contains_branchMethod · 0.45

Calls 1

contains_branchMethod · 0.95

Tested by 1

test_contains_branchMethod · 0.36