Skip to content

Annotation: always use FancyBboxPatch instead of bbox_artist #4178

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jul 22, 2015
Prev Previous commit
Next Next commit
Grammer of "shrink" variations
  • Loading branch information
efiring committed Jul 19, 2015
commit ebaa39a57d5ca6416e659782a2551add536a0a05
14 changes: 7 additions & 7 deletions lib/matplotlib/patches.py
Original file line number Diff line number Diff line change
Expand Up @@ -2738,15 +2738,15 @@ def __call__(self, posA, posB,
shrinkA=2., shrinkB=2., patchA=None, patchB=None):
"""
Calls the *connect* method to create a path between *posA*
and *posB*. The path is clipped and shrinked.
and *posB*. The path is clipped and shrunken.
"""

path = self.connect(posA, posB)

clipped_path = self._clip(path, patchA, patchB)
shrinked_path = self._shrink(clipped_path, shrinkA, shrinkB)
shrunk_path = self._shrink(clipped_path, shrinkA, shrinkB)

return shrinked_path
return shrunk_path

def __reduce__(self):
# because we have decided to nest these classes, we need to
Expand Down Expand Up @@ -3204,9 +3204,9 @@ def __call__(self, path, mutation_size, linewidth,
vertices, codes = path.vertices[:], path.codes[:]
# Squeeze the height
vertices[:, 1] = vertices[:, 1] / aspect_ratio
path_shrinked = Path(vertices, codes)
path_shrunk = Path(vertices, codes)
# call transmute method with squeezed height.
path_mutated, fillable = self.transmute(path_shrinked,
path_mutated, fillable = self.transmute(path_shrunk,
linewidth,
mutation_size)
if cbook.iterable(fillable):
Expand Down Expand Up @@ -3261,7 +3261,7 @@ def _get_arrow_wedge(self, x0, y0, x1, y1,
Return the paths for arrow heads. Since arrow lines are
drawn with capstyle=projected, The arrow goes beyond the
desired point. This method also returns the amount of the path
to be shrinked so that it does not overshoot.
to be shrunken so that it does not overshoot.
"""

# arrow from x0, y0 to x1, y1
Expand Down Expand Up @@ -3968,7 +3968,7 @@ def __init__(self, posA=None, posB=None,
"""
If *posA* and *posB* is given, a path connecting two point are
created according to the connectionstyle. The path will be
clipped with *patchA* and *patchB* and further shrinked by
clipped with *patchA* and *patchB* and further shrunken by
*shrinkA* and *shrinkB*. An arrow is drawn along this
resulting path using the *arrowstyle* parameter. If *path*
provided, an arrow is drawn along this path and *patchA*,
Expand Down