Skip to content

Commit 5a0535d

Browse files
committed
simplify by removing [index]
1 parent 970f304 commit 5a0535d

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

plotly/tools.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1177,11 +1177,10 @@ def _pad(s, cell_len=cell_len):
11771177
y_dom = list_of_domains[1::2]
11781178
subtitle_pos_x = []
11791179
subtitle_pos_y = []
1180-
for index in range(len(x_dom)):
1181-
subtitle_pos_x.append(((x_dom[index][1]) - (x_dom[index][0])) / 2 +
1182-
x_dom[index][0])
1183-
for y_end in y_dom: # y_dom --> y_domains above ?
1184-
subtitle_pos_y.append(y_end[1])
1180+
for x_domains in x_dom:
1181+
subtitle_pos_x.append(sum(x_domains) / 2)
1182+
for y_domains in y_dom:
1183+
subtitle_pos_y.append(y_domains[1])
11851184
# If shared_axes is True the domin of each subplot is not returned so the
11861185
# title position must be calculated for each subplot
11871186
else:

0 commit comments

Comments
 (0)