Skip to content

Commit

Permalink
Fix typo in rotate [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
AnsonTran committed Apr 19, 2024
1 parent 57a9d52 commit 4ea7cce
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
5 changes: 0 additions & 5 deletions lib/matplotlib/tests/test_transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,11 +464,6 @@ def test_rotate_around(self):
# assert_array_almost_equal(r270.transform(self.multiple_points),
# [[2, 2], [3, -1], [0, -2]])

# raise TypeError(np.array_str((r90[2]+r90[2]).get_matrix(),
# precision=2, suppress_small=True))
# raise TypeError(np.array_str(r180[2].get_matrix(),
# precision=2, suppress_small=True))

for dim in range(3):
assert_array_almost_equal(
(r90[dim] + r90[dim]).get_matrix(), r180[dim].get_matrix())
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -2301,7 +2301,7 @@ def rotate(self, theta, dim=0):
mtx[0, 0] = (a * xx) - (b * yx)
mtx[0, 1] = (a * xy) - (b * yy)
mtx[0, 2] = (a * xz) - (b * yz)
mtx[0, 3] = (a * x0) + (b * y0)
mtx[0, 3] = (a * x0) - (b * y0)
mtx[1, 0] = (b * xx) + (a * yx)
mtx[1, 1] = (b * xy) + (a * yy)
mtx[1, 2] = (b * xz) + (a * yz)
Expand Down

0 comments on commit 4ea7cce

Please sign in to comment.