Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 20e02fc

Browse files
committed
Clarify segment array shape
1 parent 73890e1 commit 20e02fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/lines_bars_and_markers/multicolored_line.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# Create a set of line segments so that we can color them individually
2020
# This creates the points as a N x 1 x 2 array so that we can stack points
2121
# together easily to get the segments. The segments array for line collection
22-
# needs to be numlines x points per line x 2 (x and y)
22+
# needs to be (numlines) x (points per line) x 2 (for x and y)
2323
points = np.array([x, y]).T.reshape(-1, 1, 2)
2424
segments = np.concatenate([points[:-1], points[1:]], axis=1)
2525

0 commit comments

Comments
 (0)