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

Skip to content

Commit e69c490

Browse files
authored
Merge pull request #19488 from anntzer/inverted
MNT: Prefer `tr1-tr2` to `tr1+tr2.inverted()`.
2 parents e24244c + 9ae6f0e commit e69c490

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/matplotlib/lines.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1432,8 +1432,7 @@ def __init__(self, xy1, xy2, slope, **kwargs):
14321432

14331433
def get_transform(self):
14341434
ax = self.axes
1435-
points_transform = (self._transform + ax.transData.inverted() +
1436-
ax.transScale)
1435+
points_transform = self._transform - ax.transData + ax.transScale
14371436

14381437
if self._xy2 is not None:
14391438
# two points were given

0 commit comments

Comments
 (0)