8000 Wrapped lines over 80 chars. · matplotlib/matplotlib@456a723 · GitHub
[go: up one dir, main page]

Skip to content

Commit 456a723

Browse files
committed
Wrapped lines over 80 chars.
1 parent 6ad4e85 commit 456a723

File tree

4 files changed

+18
-7
lines changed

4 files changed

+18
-7
lines changed

lib/matplotlib/artist.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,8 @@ def get_transform(self):
234234
"""
235235
if self._transform is None:
236236
self._transform = IdentityTransform()
237-
elif not isinstance(self._transform, Transform) and hasattr(self._transform, '_as_mpl_transform'):
237+
elif (not isinstance(self._transform, Transform)
238+
and hasattr(self._transform, '_as_mpl_transform')):
238239
self._transform = self._transform._as_mpl_transform(self.axes)
239240
return self._transform
240241

lib/matplotlib/collections.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,8 @@ def get_transforms(self):
158158

159159
def get_offset_transform(self):
160160
t = self._transOffset
161-
if not isinstance(t, transforms.Transform) and hasattr(t, '_as_mpl_transform'):
161+
if (not isinstance(t, transforms.Transform)
162+
and hasattr(t, '_as_mpl_transform')):
162163
t = t._as_mpl_transform(self.axes)
163164
return t
164165

lib/matplotlib/streamplot.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,15 @@ def streamplot(axes, x, y, u, v, density=1, linewidth=None, color=None,
138138
line_colors.extend(color_values)
139139
arrow_kw['color'] = cmap(norm(color_values[n]))
140140

141-
p = patches.FancyArrowPatch(arrow_tail, arrow_head, transform=transform, **arrow_kw)
141+
p = patches.FancyArrowPatch(arrow_tail,
142+
arrow_head,
143+
transform=transform,
144+
**arrow_kw)
142145
axes.add_patch(p)
143146

144-
lc = mcollections.LineCollection(streamlines, transform=transform, **line_kw)
147+
lc = mcollections.LineCollection(streamlines,
148+
transform=transform,
149+
**line_kw)
145150
if use_multicolor_lines:
146151
lc.set_array(np.asarray(line_colors))
147152
lc.set_cmap(cmap)

lib/matplotlib/tests/test_transforms.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ def _as_mpl_transform(self, axes):
6666
ax.set_xlim(0, 100)
6767
ax.set_ylim(0, 100)
6868
# assert that the top transform of the line is the scale transform.
69-
np.testing.assert_allclose(line.get_transform()._a.get_matrix(), mtrans.Affine2D().scale(10).get_matrix())
69+
np.testing.assert_allclose(line.get_transform()._a.get_matrix(),
70+
mtrans.Affine2D().scale(10).get_matrix())
7071

7172

7273
@image_comparison(baseline_images=['pre_transform_data'])
@@ -78,10 +79,13 @@ def test_pre_transform_plotting():
7879

7980
ax.contourf(np.arange(48).reshape(6, 8), transform=times10 + ax.transData)
8081

81-
ax.pcolormesh(np.linspace(0, 4, 7), np.linspace(5.5, 8, 9), np.arange(48).reshape(6, 8),
82+
ax.pcolormesh(np.linspace(0, 4, 7),
83+
np.linspace(5.5, 8, 9),
84+
np.arange(48).reshape(6, 8),
8285
transform=times10 + ax.transData)
8386

84-
ax.scatter(np.linspace(0, 10), np.linspace(10, 0), transform=times10 + ax.transData)
87+
ax.scatter(np.linspace(0, 10), np.linspace(10, 0),
88+
transform=times10 + ax.transData)
8589

8690

8791
x = np.linspace(8, 10, 20)

0 commit comments

Comments
 (0)
0