Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 460306e

Browse files
Remove references to 'text' for describing original box
1 parent 80d1c40 commit 460306e

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

lib/matplotlib/patches.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2547,7 +2547,7 @@ def __call__(self, x0, y0, width, height, mutation_size):
25472547
dx = (y1 - y0) / 2
25482548
dxx = dx / 2
25492549

2550-
# Pad text to position text and its padding margin exactly inside arrow tail
2550+
# Pad to position original box and its margins exactly inside arrow shaft
25512551
padding_offset = (0.5 * pad) + (0.25 * mutation_size)
25522552
x0 -= padding_offset
25532553

@@ -2571,9 +2571,9 @@ def __call__(self, x0, y0, width, height, mutation_size):
25712571
angle_adjustment = ((dx + width_adjustment) / tan_half_angle) - dxx
25722572

25732573
# If there is sufficient space available, shorten the arrow tail to push
2574-
# some of the text padding margin into the head
2574+
# some of the padding margin into the head
25752575
if self.head_width > 1 and pad * tan_half_angle < width_adjustment:
2576-
# Pad text into head
2576+
# Pad original box into head
25772577
x0 += pad
25782578

25792579
return Path._create_closed([
@@ -2625,8 +2625,8 @@ def __call__(self, x0, y0, width, height, mutation_size):
26252625
# Trapezium-shaped reversed arrow (reversed triangle 'cut off' by
26262626
# end of body
26272627

2628-
# Vertical distance between top of text at end furthest from arrow
2629-
# head and corner of trapezium
2628+
# Vertical distance between top of original box at end furthest from
2629+
# arrow head and corner of trapezium
26302630
vertical_offset = width_adjustment + ((x0 - x1) * tan_half_angle)
26312631

26322632
return Path._create_closed([
@@ -2693,7 +2693,7 @@ def __call__(self, x0, y0, width, height, mutation_size):
26932693
dx = (y1 - y0) / 2
26942694
dxx = dx / 2
26952695

2696-
# Pad text
2696+
# Pad original box
26972697
padding_offset = (0.5 * pad) + (0.25 * mutation_size)
26982698
x0 -= padding_offset
26992699
x1 += 2 * pad
@@ -2718,9 +2718,9 @@ def __call__(self, x0, y0, width, height, mutation_size):
27182718
angle_adjustment = ((dx + width_adjustment) / tan_half_angle) - dxx
27192719

27202720
# If there is sufficient space available, shorten the arrow tail to push
2721-
# some of the text padding margin into the heads
2721+
# some of the padding margin into the heads
27222722
if self.head_width > 1 and pad * tan_half_angle < width_adjustment:
2723-
# Pad text into heads
2723+
# Pad original box into heads
27242724
x0 += pad
27252725
x1 -= pad
27262726

0 commit comments

Comments
 (0)