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

Method __call__

lib/matplotlib/patches.py:2578–2587  ·  view source on GitHub ↗
(self, x0, y0, width, height, mutation_size)

Source from the content-addressed store, hash-verified

2576 self.pad = pad
2577
2578 def __call__(self, x0, y0, width, height, mutation_size):
2579 pad = mutation_size * self.pad
2580 width, height = width + 2 * pad, height + 2 * pad
2581 # boundary of the padded box
2582 x0, y0 = x0 - pad, y0 - pad
2583 a = width / math.sqrt(2)
2584 b = height / math.sqrt(2)
2585 trans = Affine2D().scale(a, b).translate(x0 + width / 2,
2586 y0 + height / 2)
2587 return trans.transform_path(Path.unit_circle())
2588
2589 @_register_style(_style_list)
2590 class RArrow:

Callers

nothing calls this directly

Calls 6

Affine2DClass · 0.90
sqrtMethod · 0.80
translateMethod · 0.80
unit_circleMethod · 0.80
scaleMethod · 0.45
transform_pathMethod · 0.45

Tested by

no test coverage detected