Visitar URL original
Squashed commit of the following: · pelson/matplotlib@5915c14 · GitHub
Skip to content

Commit 5915c14

Browse files
author
Phil Elson
committed
Squashed commit of the following:
commit 597b6f0 Author: Phil Elson <philipelson@hotmail.com> Date: Fri Mar 16 16:35:01 2012 +0000 Changed version which these changes take effect. commit 270f291 Author: Phil Elson <philipelson@hotmail.com> Date: Wed Feb 29 13:22:03 2012 +0000 Review actions #3 commit 564e042 Author: Phil Elson <philipelson@hotmail.com> Date: Mon Feb 27 17:18:46 2012 +0000 Review actions #2 commit 836a459 Author: Phil Elson <philipelson@hotmail.com> Date: Mon Feb 20 15:40:06 2012 +0000 Fixed error raising unittest case commit 677a0ed Author: Phil Elson <philipelson@hotmail.com> Date: Mon Feb 20 13:44:07 2012 +0000 Minor doc changes commit f8021a2 Author: Phil Elson <philipelson@hotmail.com> Date: Mon Feb 20 13:36:11 2012 +0000 Review actions commit 7674dcd Author: Phil Elson <philipelson@hotmail.com> Date: Mon Feb 6 18:14:24 2012 +0000 Further tweaks re add_axes. commit 89053c5 Author: Phil Elson <philipelson@hotmail.com> Date: Mon Feb 6 18:03:49 2012 +0000 Reverted polar check. commit 1fa7d39 Author: Phil Elson <philipelson@hotmail.com> Date: Mon Feb 6 17:56:09 2012 +0000 Corrected having not hit git add before committing. commit eb37499 Author: Phil Elson <philipelson@hotmail.com> Date: Mon Feb 6 17:53:51 2012 +0000 Fixed error messages substitution. commit bd0fd6e Author: Phil Elson <philipelson@hotmail.com> Date: Mon Feb 6 16:56:34 2012 +0000 Matching up diffs with github's diff viewer (newlines). commit 53cbea6 Author: Phil Elson <philipelson@hotmail.com> Date: Mon Feb 6 16:55:25 2012 +0000 Tidied up branch a little. commit 40a0ec9 Author: Phil Elson <philipelson@hotmail.com> Date: Mon Feb 6 16:51:33 2012 +0000 reverted projections change. commit 756dd8c Author: Phil Elson <philipelson@hotmail.com> Date: Mon Feb 6 16:48:42 2012 +0000 Added documentation, supported add_axes regarding _as_mpl_axes. commit ab0615c Author: Phil Elson <philipelson@hotmail.com> Date: Tue Jan 31 16:57:50 2012 +0000 Tweaked. commit 1a0021b Author: Phil Elson <philipelson@hotmail.com> Date: Tue Jan 31 16:08:58 2012 +0000 Class projection support added.
1 parent 886a6ce commit 5915c14

1 file changed

Lines changed: 12 additions & 8 deletions

File tree

‎lib/matplotlib/transforms.py‎

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1351,10 +1351,12 @@ class TransformWrapper(Transform):
13511351
run time with a transform of a different type. This class allows
13521352
that replacement to correctly trigger invalidation.
13531353
1354-
Note that :class:`TransformWrapper` instances must have the same
1355-
input and output dimensions during their entire lifetime, so the
1356-
child transform may only be replaced with another child transform
1357-
of the same dimensions.
1354+
.. note::
1355+
:class:`TransformWrapper` instances must have the same
1356+
input and output dimensions during their entire lifetime, so the
1357+
child transform may only be replaced with another child transform
1358+
of the same dimensions.
1359+
13581360
"""
13591361
pass_through = True
13601362

@@ -2034,9 +2036,9 @@ def __eq__(self, other):
20342036

20352037
def _iter_break_from_left_to_right(self):
20362038
for lh_compliment, rh_compliment in self._a._iter_break_from_left_to_right():
2037-
yield lh_compliment, rh_compliment + self._b
2039+
yield lh_compliment, rh_compliment + self._b
20382040
for lh_compliment, rh_compliment in self._b._iter_break_from_left_to_right():
2039-
yield self._a + lh_compliment, rh_compliment
2041+
yield self._a + lh_compliment, rh_compliment
20402042

20412043
def _get_is_affine(self):
20422044
return self._a.is_affine and self._b.is_affine
@@ -2155,9 +2157,11 @@ def composite_transform_factory(a, b):
21552157
21562158
c = a + b
21572159
"""
2158-
if a == IdentityTransform():
2160+
# note we are not doing IdentityTransform equality here since a or b
2161+
# may be a wrapped transform which could be updated later on
2162+
if isinstance(a, IdentityTransform):
21592163
return b
2160-
elif b == IdentityTransform():
2164+
elif isinstance(b, IdentityTransform):
21612165
return a
21622166
elif a.is_affine and b.is_affine:
21632167
return CompositeAffine2D(a, b)

0 commit comments

Comments
 (0)