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 7ef6229

Browse filesBrowse files
committed
Misc. docstring cleanups.
1 parent 005acc0 commit 7ef6229
Copy full SHA for 7ef6229

File tree

Expand file treeCollapse file tree

6 files changed

+15
-17
lines changed
Filter options
Expand file treeCollapse file tree

6 files changed

+15
-17
lines changed

‎examples/animation/random_walk.py

Copy file name to clipboardExpand all lines: examples/animation/random_walk.py
+8-4Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,14 @@
1515

1616
def gen_rand_line(length, dims=2):
1717
"""
18-
Create a line using a random walk algorithm
19-
20-
length is the number of points for the line.
21-
dims is the number of dimensions the line has.
18+
Create a line using a random walk algorithm.
19+
20+
Parameters
21+
----------
22+
length : int
23+
The number of points of the line.
24+
dims : int
25+
The number of dimensions of the line.
2226
"""
2327
line_data = np.empty((dims, length))
2428
line_data[:, 0] = np.random.rand(dims)

‎examples/animation/strip_chart.py

Copy file name to clipboardExpand all lines: examples/animation/strip_chart.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def update(self, y):
4040

4141

4242
def emitter(p=0.03):
43-
'return a random value with probability p, else 0'
43+
"""Return a random value in [0, 1) with probability p, else 0."""
4444
while True:
4545
v = np.random.rand(1)
4646
if v > p:

‎examples/axisartist/demo_axis_direction.py

Copy file name to clipboardExpand all lines: examples/axisartist/demo_axis_direction.py
+1-3Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@
1919

2020

2121
def setup_axes(fig, rect):
22-
"""
23-
polar projection, but in a rectangular box.
24-
"""
22+
"""Polar projection, but in a rectangular box."""
2523

2624
# see demo_curvelinear_grid.py for details
2725
tr = Affine2D().scale(np.pi/180., 1.) + PolarAxes.PolarTransform()

‎examples/axisartist/demo_curvelinear_grid2.py

Copy file name to clipboardExpand all lines: examples/axisartist/demo_curvelinear_grid2.py
+1-3Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@
2222

2323

2424
def curvelinear_test1(fig):
25-
"""
26-
grid for custom transform.
27-
"""
25+
"""Grid for custom transform."""
2826

2927
def tr(x, y):
3028
sgn = np.sign(x)

‎examples/axisartist/simple_axis_pad.py

Copy file name to clipboardExpand all lines: examples/axisartist/simple_axis_pad.py
+1-3Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@
1919

2020

2121
def setup_axes(fig, rect):
22-
"""
23-
polar projection, but in a rectangular box.
24-
"""
22+
"""Polar projection, but in a rectangular box."""
2523

2624
# see demo_curvelinear_grid.py for details
2725
tr = Affine2D().scale(np.pi/180., 1.) + PolarAxes.PolarTransform()

‎examples/event_handling/pick_event_demo2.py

Copy file name to clipboardExpand all lines: examples/event_handling/pick_event_demo2.py
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
Pick Event Demo2
44
================
55
6-
compute the mean and standard deviation (stddev) of 100 data sets and plot
7-
mean vs stddev. When you click on one of the mu, sigma points, plot the raw
8-
data from the dataset that generated the mean and stddev.
6+
Compute the mean (mu) and standard deviation (sigma) of 100 data sets and plot
7+
mu vs. sigma. When you click on one of the (mu, sigma) points, plot the raw
8+
data from the dataset that generated this point.
99
"""
1010
import numpy as np
1111
import matplotlib.pyplot as plt

0 commit comments

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