Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5ca46ea

Browse filesBrowse files
committed
Removed additional pep8 e501 error caused by mtransforms
1 parent d72ef38 commit 5ca46ea
Copy full SHA for 5ca46ea

File tree

Expand file treeCollapse file tree

2 files changed

+13
-10
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+13
-10
lines changed

‎lib/matplotlib/colorbar.py

Copy file name to clipboardExpand all lines: lib/matplotlib/colorbar.py
+6-5Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -687,9 +687,10 @@ def _process_values(self, b=None):
687687
self.norm.vmin = 0
688688
self.norm.vmax = 1
689689

690-
self.norm.vmin, self.norm.vmax = mtransforms.nonsingular(self.norm.vmin,
691-
self.norm.vmax,
692-
expander=0.1)
690+
self.norm.vmin, self.norm.vmax = mtransforms.nonsingular(
691+
self.norm.vmin,
692+
self.norm.vmax,
693+
expander=0.1)
693694

694695
b = self.norm.inverse(self._uniform_y(self.cmap.N + 1))
695696

@@ -1126,8 +1127,8 @@ def make_axes(parents, location=None, orientation=None, fraction=0.15,
11261127
'parents share the same figure.')
11271128

11281129
# take a bounding box around all of the given axes
1129-
parents_bbox = mtransforms.Bbox.union([ax.get_position(original=True).frozen()
1130-
for ax in parents])
1130+
parents_bbox = mtransforms.Bbox.union(
1131+
[ax.get_position(original=True).frozen() for ax in parents])
11311132

11321133
pb = parents_bbox
11331134
if location in ('left', 'right'):

‎lib/matplotlib/tests/test_transforms.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_transforms.py
+7-5Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ def __init__(self, scale_factor):
6262
self._scale_factor = scale_factor
6363

6464
def _as_mpl_transform(self, axes):
65-
return mtransforms.Affine2D().scale(self._scale_factor) + axes.transData
65+
return (mtransforms.Affine2D().scale(self._scale_factor)
66+
+ axes.transData)
6667

6768
ax = plt.axes()
6869
line, = plt.plot(np.arange(10), transform=ScaledBy(10))
@@ -191,7 +192,7 @@ def test_clipping_of_log():
191192

192193
# something like this happens in plotting logarithmic histograms
193194
trans = mtransforms.BlendedGenericTransform(mtransforms.Affine2D(),
194-
LogScale.Log10Transform('clip'))
195+
LogScale.Log10Transform('clip'))
195196
tpath = trans.transform_path_non_affine(path)
196197
result = tpath.iter_segments(trans.get_affine(),
197198
clip=(0, 0, 100, 100),
@@ -379,7 +380,8 @@ def test_line_extent_compound_coords1(self):
379380
# a simple line in data coordinates in the y component, and in axes
380381
# coordinates in the x
381382
ax = plt.axes()
382-
trans = mtransforms.blended_transform_factory(ax.transAxes, ax.transData)
383+
trans = mtransforms.blended_transform_factory(ax.transAxes,
384+
ax.transData)
383385
ax.plot([0.1, 1.2, 0.8], [35, -5, 18], transform=trans)
384386
assert_array_equal(ax.dataLim.get_points(),
385387
np.array([[np.inf, -5.],
@@ -399,8 +401,8 @@ def test_line_extent_compound_coords2(self):
399401
# a simple line in (offset + data) coordinates in the y component, and
400402
# in axes coordinates in the x
401403
ax = plt.axes()
402-
trans = mtransforms.blended_transform_factory(
403-
ax.transAxes, mtransforms.Affine2D().scale(10) + ax.transData)
404+
trans = mtransforms.blended_transform_factory(ax.transAxes,
405+
mtransforms.Affine2D().scale(10) + ax.transData)
404406
ax.plot([0.1, 1.2, 0.8], [35, -5, 18], transform=trans)
405407
assert_array_equal(ax.dataLim.get_points(),
406408
np.array([[np.inf, -50.], [-np.inf, 350.]]))

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.