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 6b4678b

Browse filesBrowse files
committed
Add docstring to example funtion
Also made a minor PEP8 change
1 parent 339ca4e commit 6b4678b
Copy full SHA for 6b4678b

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

+4
-1
lines changed

‎examples/pylab_examples/stackplot_demo2.py

Copy file name to clipboardExpand all lines: examples/pylab_examples/stackplot_demo2.py
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33

44
np.random.seed(0)
55
def layers(n, m):
6+
"""
7+
Return *n* random Gaussian mixtures, each of length *m*.
8+
"""
69
def bump(a):
710
x = 1 / (.1 + np.random.random())
811
y = 2 * np.random.random() - .5
@@ -16,7 +19,7 @@ def bump(a):
1619
bump(a[:, i])
1720
return a
1821

19-
d=layers(3, 100)
22+
d = layers(3, 100)
2023

2124
plt.subplots()
2225
plt.stackplot(range(100), d.T, baseline='wiggle')

0 commit comments

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