8000 Review comments · matplotlib/matplotlib@602cbd1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 602cbd1

Browse files
committed
Review comments
1 parent f928874 commit 602cbd1

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

lib/matplotlib/legend_handler.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -606,8 +606,8 @@ def create_artists(self, legend, orig_handle,
606606
leg_markerline = Line2D(xdata_marker, ydata[:len(xdata_marker)])
607607
self.update_prop(leg_markerline, markerline, legend)
608608

609-
leg_stemlines = [Line2D([thisx, thisx], [bottom, thisy])
610-
for thisx, thisy in zip(xdata_marker, ydata)]
609+
leg_stemlines = [Line2D([x, x], [bottom, y])
610+
for x, y in zip(xdata_marker, ydata)]
611611

612612
for lm, m in zip(leg_stemlines, stemlines):
613613
self.update_prop(lm, m, legend)

lib/mpl_toolkits/mplot3d/art3d.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,8 @@ def path_to_3d_segment_with_codes(path, zs=0, zdir='z'):
190190

191191
zs = np.broadcast_to(zs, len(path))
192192
pathsegs = path.iter_segments(simplify=False, curves=False)
193-
seg, codes = zip(
194-
*[((x, y, z), code) for (((x, y), code), z) in zip(pathsegs, zs)])
193+
seg_codes = [((x, y, z), code) for ((x, y), code), z in zip(pathsegs, zs)]
194+
seg, codes = zip(*seg_codes)
195195
seg3d = [juggle_axes(x, y, z, zdir) for (x, y, z) in seg]
196196
return seg3d, list(codes)
197197

@@ -202,10 +202,10 @@ def paths_to_3d_segments_with_codes(paths, zs=0, zdir='z'):
202202
"""
203203

204204
zs = np.broadcast_to(zs, len(paths))
205-
segments, codes_list = zip(
206-
*[path_to_3d_segment_with_codes(path, pathz, zdir)
207-
for path, pathz in zip(paths, zs)])
208-
return list(segments), list(codes_list)
205+
segments_codes = [path_to_3d_segment_with_codes(path, pathz, zdir)
206+
for path, pathz in zip(paths, zs)]
207+
segments, codes = zip(*segments_codes)
208+
return list(segments), list(codes)
209209

210210

211211
class Line3DCollection(LineCollection):

0 commit comments

Comments
 (0)
0