8000 Intermediate commit to request some assistance. · matplotlib/matplotlib@1b1b340 · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit 1b1b340

Browse files
Phil Elsonpelson
authored andcommitted
Intermediate commit to request some assistance.
1 parent c088477 commit 1b1b340

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

lib/matplotlib/collections.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,15 @@ def draw(self, renderer):
245245
if self._hatch:
246246
gc.set_hatch(self._hatch)
247247

248+
# XXX INVESTIGATE.
249+
print('transOffset: ', transOffset)
250+
print(transOffset.is_affine, transOffset.get_matrix())
251+
mtx = transOffset.get_matrix()
252+
import matplotlib.transforms as mtransforms
253+
transOffset = mtransforms.Affine2D()
254+
transOffset.set_matrix(mtx)
255+
# XXX end investigate
256+
248257
renderer.draw_path_collection(
249258
gc, transform.frozen(), paths, self.get_transforms(),
250259
offsets, transOffset, self.get_facecolor(), self.get_edgecolor(),

lib/matplotlib/transforms.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
import cbook
4747
from path import Path
4848

49-
DEBUG = False
49+
DEBUG = True
5050
if DEBUG:
5151
import warnings
5252

@@ -1315,6 +1315,10 @@ def set(self, child):
13151315
self.invalidate()
13161316
self._invalid = 0
13171317

1318+
def _get_is_affine(self):
1319+
return self._child.is_affine
1320+
is_affine = property(_get_is_affine)
1321+
13181322
def _get_is_separable(self):
13191323
return self._child.is_separable
13201324
is_separable = property(_get_is_separable)
@@ -1443,7 +1447,7 @@ def transform(self, points):
14431447
warnings.warn(
14441448
('A non-numpy array of type %s was passed in for ' +
14451449
'transformation. Please correct this.')
1446-
% type(values))
1450+
% type(points))
14471451
return self._transform(points)
14481452
transform.__doc__ = AffineBase.transform.__doc__
14491453

@@ -2052,7 +2056,7 @@ def composite_transform_factory(a, b):
20522056
return b
20532057
elif isinstance(b, IdentityTransform):
20542058
return a
2055-
elif a.is_affine and b.is_affine:
2059+
elif isinstance(a, Affine2D) and isinstance(b, Affine2D):
20562060
return CompositeAffine2D(a, b)
20572061
return CompositeGenericTransform(a, b)
20582062

0 commit comments

Comments
 (0)
0