8000 Changes as a result of reading diffs prior to pull request. · matplotlib/matplotlib@83ed6c8 · GitHub
[go: up one dir, main page]

Skip to content

Commit 83ed6c8

Browse files
Phil Elsonpelson
Phil Elson
authored andcommitted
Changes as a result of reading diffs prior to pull request.
1 parent dfbe69c commit 83ed6c8

File tree

3 files changed

+10
-21
lines changed

3 files changed

+10
-21
lines changed

lib/matplotlib/axes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1473,8 +1473,8 @@ def _update_line_limits(self, line):
14731473
return
14741474

14751475
line_trans = line.get_transform()
1476-
1477-
if line.get_transform() == self.transData:
1476+
1477+
if line_trans == self.transData:
14781478
data_path = path
14791479

14801480
elif line_trans.contains_branch(self.transData):

lib/matplotlib/tests/test_axes.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import matplotlib
44
from matplotlib.testing.decorators import image_comparison, knownfailureif
55
import matplotlib.pyplot as plt
6-
import matplotlib.transforms as mtrans
76

87

98
@image_comparison(baseline_images=['formatter_ticker_001',

lib/matplotlib/transforms.py

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1103,8 +1103,9 @@ def _iter_break_from_left_to_right(self):
11031103
right recursively. If self == ((A, N), A) then the result will be an
11041104
iterator which yields I : ((A, N), A), followed by A : (N, A),
11051105
followed by (A, N) : (A), but not ((A, N), A) : I.
1106-
This is equivalent to flattening the stack then slicing it with
1107-
``flat_stack[i:]`` where i starts at 0 and ends at -1.
1106+
1107+
This is equivalent to flattening the stack then yielding
1108+
``flat_stack[:i], flat_stack[i:]`` where i=0..(n-1).
11081109
11091110
"""
11101111
yield IdentityTransform(), self
@@ -1136,11 +1137,12 @@ def __sub__(self, other):
11361137
11371138
# sometimes, when A contains the tree B there is no need to descend all the way down
11381139
# to the base of A (via B), instead we can just stop at B.
1139-
(A, B) - (B)-1 == A
11401140
1141+
(A + B) - (B)^-1 == A
1142+
11411143
# similarly, when B contains tree A, we can avoid decending A at all, basically:
1142- A - B == (B - A).inverted() or B-1
1143-
1144+
A - (A + B) == ((B + A) - A).inverted() or B^-1
1145+
11441146
For clarity, the result of ``(A + B) - B + B == (A + B)``.
11451147
11461148
"""
@@ -1171,11 +1173,7 @@ def __array__(self, *args, **kwargs):
11711173
"""
11721174
Array interface to get at this Transform's matrix.
11731175
"""
1174-
# note, this method is also used by C/C++ -based backends
1175-
if self.is_affine:
1176-
return self.get_matrix()
1177-
else:
1178-
raise ValueError('Cannot convert this transform to an array.')
1176+
raise NotImplementedError()
11791177

11801178
def transform(self, values):
11811179
"""
@@ -1870,10 +1868,6 @@ def __repr__(self):
18701868
return "BlendedGenericTransform(%s,%s)" % (self._x, self._y)
18711869
__str__ = __repr__
18721870

1873-
def transform_affine(self, points):
1874-
return self.get_affine().transform(points)
1875-
transform_affine.__doc__ = Transform.transform_affine.__doc__
1876-
18771871
def transform_non_affine(self, points):
18781872
if self._x.is_affine and self._y.is_affine:
18791873
return points
@@ -2092,10 +2086,6 @@ def transform_non_affine(self, points):
20922086
self._a.transform(points))
20932087
transform_non_affine.__doc__ = Transform.transform_non_affine.__doc__
20942088

2095-
def transform_path_affine(self, path):
2096-
return self.get_affine().transform_path_affine(path)
2097-
transform_path_affine.__doc__ = Transform.transform_path_affine.__doc__
2098-
20992089
def transform_path_non_affine(self, path):
21002090
if self._a.is_affine and self._b.is_affine:
21012091
return path

0 commit comments

Comments
 (0)
0