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 0891026

Browse filesBrowse files
NelleVdmcdougall
authored andcommitted
PEP8 fixes - break points and identation
1 parent 6b6784d commit 0891026
Copy full SHA for 0891026

File tree

Expand file treeCollapse file tree

1 file changed

+11
-12
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+11
-12
lines changed

‎lib/matplotlib/tight_layout.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tight_layout.py
+11-12Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -134,31 +134,32 @@ def auto_adjust_subplotpars(fig, renderer,
134134

135135
if num2 is None:
136136
# left
137-
hspaces[row1 * (cols + 1) + col1].append(_get_left(tight_bbox,
138-
ax_bbox))
137+
hspaces[row1 * (cols + 1) + col1].append(
138+
_get_left(tight_bbox, ax_bbox))
139139
# right
140140
hspaces[row1 * (cols + 1) + (col1 + 1)].append(
141141
_get_right(tight_bbox, ax_bbox))
142142
# top
143-
vspaces[row1 * cols + col1].append(_get_top(tight_bbox, ax_bbox))
143+
vspaces[row1 * cols + col1].append(
144+
_get_top(tight_bbox, ax_bbox))
144145
# bottom
145-
vspaces[(row1 + 1) * cols + col1].append(_get_bottom(tight_bbox,
146-
ax_bbox))
146+
vspaces[(row1 + 1) * cols + col1].append(
147+
_get_bottom(tight_bbox, ax_bbox))
147148

148149
else:
149150
row2, col2 = divmod(num2, cols)
150151

151152
for row_i in range(row1, row2 + 1):
152153
# left
153154
hspaces[row_i * (cols + 1) + col1].append(
154-
_get_left(tight_bbox, ax_bbox))
155+
_get_left(tight_bbox, ax_bbox))
155156
# right
156157
hspaces[row_i * (cols + 1) + (col2 + 1)].append(
157158
_get_right(tight_bbox, ax_bbox))
158159
for col_i in range(col1, col2 + 1):
159160
# top
160-
vspaces[row1 * cols + col_i].append(_get_top(tight_bbox,
161-
ax_bbox))
161+
vspaces[row1 * cols + col_i].append(
162+
_get_top(tight_bbox, ax_bbox))
162163
# bottom
163164
vspaces[(row2 + 1) * cols + col_i].append(
164165
_get_bottom(tight_bbox, ax_bbox))
@@ -190,10 +191,8 @@ def auto_adjust_subplotpars(fig, renderer,
190191
top=1 - margin_top)
191192

192193
if cols > 1:
193-
hspace = max([sum(s)
194-
for i in range(rows)
195-
for s
196-
in hspaces[i * (cols + 1) + 1:(i + 1) * (cols + 1) - 1]])
194+
hspace_strip = hspaces[i * (cols + 1) + 1:(i + 1) * (cols + 1) - 1]
195+
hspace = max([sum(s) for i in range(rows) for s in hspace_strip])
197196
hspace += hpad_inches / fig_width_inch
198197
h_axes = ((1 - margin_right - margin_left) -
199198
hspace * (cols - 1)) / cols

0 commit comments

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