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

Skip to content

Commit d5eb691

Browse files
committed
FancyArrowPatch.__str__ updated
svn path=/trunk/matplotlib/; revision=8018
1 parent 719a1f7 commit d5eb691

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

lib/matplotlib/patches.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3535,8 +3535,16 @@ class FancyArrowPatch(Patch):
35353535

35363536

35373537
def __str__(self):
3538-
return self.__class__.__name__ \
3539-
+ "FancyArrowPatch(%g,%g,%g,%g,%g,%g)" % tuple(self._q_bezier)
3538+
3539+
3540+
if self._posA_posB is not None:
3541+
(x1, y1), (x2, y2) = self._posA_posB
3542+
return self.__class__.__name__ \
3543+
+ "(%g,%g->%g,%g)" % (x1, y1, x2, y2)
3544+
else:
3545+
return self.__class__.__name__ \
3546+
+ "(%s)" % (str(self._path_original),)
3547+
35403548

35413549
@docstring.dedent_interpd
35423550
def __init__(self, posA=None, posB=None,

0 commit comments

Comments
 (0)