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 721c6a1

Browse filesBrowse files
committed
Clarify segment array shape
1 parent 9e85244 commit 721c6a1
Copy full SHA for 721c6a1

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed

‎examples/lines_bars_and_markers/multicolored_line.py

Copy file name to clipboardExpand all lines: examples/lines_bars_and_markers/multicolored_line.py
+1-1Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.